aboutsummaryrefslogtreecommitdiffstats
path: root/src/floatfns.c
diff options
context:
space:
mode:
authorPaul Eggert2019-11-15 18:40:45 -0800
committerPaul Eggert2019-11-15 18:41:35 -0800
commit5ed66f10ecae232e1af321913b22fc3ecf0608c7 (patch)
tree211068d57ee896808d02b0f350b9b0c5f85a958b /src/floatfns.c
parentc793395cca70e6a673dc4dd910ea93c7b5dcee80 (diff)
downloademacs-5ed66f10ecae232e1af321913b22fc3ecf0608c7.tar.gz
emacs-5ed66f10ecae232e1af321913b22fc3ecf0608c7.zip
Port new float-scaling code to Solaris
* src/floatfns.c (double_integer_scale): Simplify, so that the function works when (FP_ILOGBNAN == INT_MAX && FP_ILOGB0 == INT_MIN), as on Solaris.
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 30526a16443..73d84301e4f 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -350,10 +350,7 @@ double_integer_scale (double d)
350 return (DBL_MIN_EXP - 1 <= exponent && exponent < INT_MAX 350 return (DBL_MIN_EXP - 1 <= exponent && exponent < INT_MAX
351 ? DBL_MANT_DIG - 1 - exponent 351 ? DBL_MANT_DIG - 1 - exponent
352 : (DBL_MANT_DIG - DBL_MIN_EXP 352 : (DBL_MANT_DIG - DBL_MIN_EXP
353 + ((exponent == FP_ILOGBNAN 353 + (isnan (d) ? 2 : exponent == INT_MAX)));
354 && (FP_ILOGBNAN != FP_ILOGB0 || isnan (d)))
355 ? 2
356 : exponent == INT_MAX)));
357} 354}
358 355
359/* Convert the Lisp number N to an integer and return a pointer to the 356/* Convert the Lisp number N to an integer and return a pointer to the