1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 08:20:20 +02:00

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.
This commit is contained in:
Andy Wingo 2017-02-21 22:12:18 +01:00
parent c4b0491e91
commit 5333642b71

View file

@ -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)))