]> git.eshelyaron.com Git - emacs.git/commitdiff
Port new float-scaling code to Solaris
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Nov 2019 02:40:45 +0000 (18:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Nov 2019 02:41:35 +0000 (18:41 -0800)
* src/floatfns.c (double_integer_scale): Simplify, so that the
function works when (FP_ILOGBNAN == INT_MAX && FP_ILOGB0 == INT_MIN),
as on Solaris.

src/floatfns.c

index 30526a1644330c0b71bbb155f4c0094a7a3c5654..73d84301e4fe2804b030fea1fa810563b1903bf9 100644 (file)
@@ -350,10 +350,7 @@ double_integer_scale (double d)
   return (DBL_MIN_EXP - 1 <= exponent && exponent < INT_MAX
          ? DBL_MANT_DIG - 1 - exponent
          : (DBL_MANT_DIG - DBL_MIN_EXP
-            + ((exponent == FP_ILOGBNAN
-                && (FP_ILOGBNAN != FP_ILOGB0 || isnan (d)))
-               ? 2
-               : exponent == INT_MAX)));
+            + (isnan (d) ? 2 : exponent == INT_MAX)));
 }
 
 /* Convert the Lisp number N to an integer and return a pointer to the