diff options
author | Bruno Haible <bruno@clisp.org> | 2012-03-04 23:01:33 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-03-04 23:01:33 +0100 |
commit | 9655379852fdbf3a0797035fc30a4060a2b191cf (patch) | |
tree | c3f82f8a0a0e726c83e4706de7be12d09f6c5b44 /m4/remainder.m4 | |
parent | 7feced3510dfaaeceba87eac4d5140977943e66d (diff) | |
download | gnulib-9655379852fdbf3a0797035fc30a4060a2b191cf.tar.gz |
remainder, remainderf, remainderl: Fix computation for large quotients.
* lib/remainder.c: Completely rewritten.
* lib/remainderf.c (remainderf): Use implementation of remainder.c with
USE_FLOAT.
* lib/remainderl.c (remainderl): Use implementation of remainder.c with
USE_LONG_DOUBLE.
* modules/remainder (Depends-on): Add isfinite, signbit, fabs, fmod,
isnand, isinf. Remove round, fma.
* modules/remainderf (Files): Add lib/remainder.c.
(Depends-on): Add isfinite, signbit, fabsf, fmodf, isnanf, isinf.
Remove roundf, fmaf.
* modules/remainderl (Files): Add lib/remainder.c.
(Depends-on): Add float, isfinite, signbit, fabsl, fmodl, isnanl,
isinf. Remove roundl, fmal.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Update computation of
REMAINDER_LIBM.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Update computation of
REMAINDERF_LIBM.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Update computation of
REMAINDERL_LIBM.
Diffstat (limited to 'm4/remainder.m4')
-rw-r--r-- | m4/remainder.m4 | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/m4/remainder.m4 b/m4/remainder.m4 index 855c1bb3f2..f788a20fc7 100644 --- a/m4/remainder.m4 +++ b/m4/remainder.m4 @@ -1,4 +1,4 @@ -# remainder.m4 serial 2 +# remainder.m4 serial 3 dnl Copyright (C) 2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -104,18 +104,24 @@ int main (int argc, char *argv[]) fi if test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1; then dnl Find libraries needed to link lib/remainder.c. - AC_REQUIRE([gl_FUNC_ROUND]) - AC_REQUIRE([gl_FUNC_FMA]) + AC_REQUIRE([gl_FUNC_FABS]) + AC_REQUIRE([gl_FUNC_FMOD]) + AC_REQUIRE([gl_FUNC_ISNAND]) REMAINDER_LIBM= - dnl Append $ROUND_LIBM to REMAINDER_LIBM, avoiding gratuitous duplicates. + dnl Append $FABS_LIBM to REMAINDER_LIBM, avoiding gratuitous duplicates. case " $REMAINDER_LIBM " in - *" $ROUND_LIBM "*) ;; - *) REMAINDER_LIBM="$REMAINDER_LIBM $ROUND_LIBM" ;; + *" $FABS_LIBM "*) ;; + *) REMAINDER_LIBM="$REMAINDER_LIBM $FABS_LIBM" ;; esac - dnl Append $FMA_LIBM to REMAINDER_LIBM, avoiding gratuitous duplicates. + dnl Append $FMOD_LIBM to REMAINDER_LIBM, avoiding gratuitous duplicates. case " $REMAINDER_LIBM " in - *" $FMA_LIBM "*) ;; - *) REMAINDER_LIBM="$REMAINDER_LIBM $FMA_LIBM" ;; + *" $FMOD_LIBM "*) ;; + *) REMAINDER_LIBM="$REMAINDER_LIBM $FMOD_LIBM" ;; + esac + dnl Append $ISNAND_LIBM to REMAINDER_LIBM, avoiding gratuitous duplicates. + case " $REMAINDER_LIBM " in + *" $ISNAND_LIBM "*) ;; + *) REMAINDER_LIBM="$REMAINDER_LIBM $ISNAND_LIBM" ;; esac fi AC_SUBST([REMAINDER_LIBM]) |