projects
/
platform
/
upstream
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4b0491
)
Use labs instead of abs where needed
author
Andy Wingo
<wingo@pobox.com>
Tue, 21 Feb 2017 21:12:18 +0000
(22:12 +0100)
committer
Andy Wingo
<wingo@pobox.com>
Tue, 21 Feb 2017 21:12:18 +0000
(22:12 +0100)
* libguile/numbers.c (log_of_fraction): Use labs instead of abs on
longs. Thanks to Matt Wette for the tip.
libguile/numbers.c
patch
|
blob
|
history
diff --git
a/libguile/numbers.c
b/libguile/numbers.c
index b926d2472c98037911cd056dc4dc86e7e024f05d..99b564e952a973b2c259cc76f356ef62b54b2857 100644
(file)
--- a/
libguile/numbers.c
+++ b/
libguile/numbers.c
@@
-9953,7
+9953,7
@@
log_of_fraction (SCM n, SCM d)
long n_size = scm_to_long (scm_integer_length (n));
long d_size = scm_to_long (scm_integer_length (d));
- if (abs (n_size - d_size) > 1)
+ if (
l
abs (n_size - d_size) > 1)
return (scm_difference (log_of_exact_integer (n),
log_of_exact_integer (d)));
else if (scm_is_false (scm_negative_p (n)))