diff options
author | Andy Wingo <wingo@pobox.com> | 2017-02-21 22:12:18 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-02-21 22:12:18 +0100 |
commit | 5333642b71a35d1a181a9cf008caefe77b44b2a0 (patch) | |
tree | 54bf3540a110855d59fc0313cfdaf9cb54a81999 /libguile | |
parent | c4b0491e91a7c4d4a2b89511b37eae61e79de47a (diff) |
Use labs instead of abs where needed
* libguile/numbers.c (log_of_fraction): Use labs instead of abs on
longs. Thanks to Matt Wette for the tip.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/numbers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/numbers.c b/libguile/numbers.c index b926d2472..99b564e95 100644 --- 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 (labs (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))) |