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

Don't use HAVE_COPYSIGN in libguile/numbers.c

* libguile/numbers.c (icmplx2str): As stated. copysign() is required by C99 and
  already used without guards elsewhere in this file.
This commit is contained in:
Daniel Llorens 2022-01-10 12:46:57 +01:00 committed by Andy Wingo
parent 6058d9e05d
commit 4feff820be

View file

@ -3450,11 +3450,7 @@ icmplx2str (double real, double imag, char *str, int radix)
double sgn; double sgn;
i = idbl2str (real, str, radix); i = idbl2str (real, str, radix);
#ifdef HAVE_COPYSIGN
sgn = copysign (1.0, imag); sgn = copysign (1.0, imag);
#else
sgn = imag;
#endif
/* Don't output a '+' for negative numbers or for Inf and /* Don't output a '+' for negative numbers or for Inf and
NaN. They will provide their own sign. */ NaN. They will provide their own sign. */
if (sgn >= 0 && isfinite (imag)) if (sgn >= 0 && isfinite (imag))