diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-11-26 23:26:37 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-11-26 23:26:37 -0500 |
commit | a663c930196b50194921e7ee685d0704ac32f6f4 (patch) | |
tree | ebd0c3d8fc96002ff6049a90c31c7db8ec9d1a74 | |
parent | f63b8c8c455929f0f46cc017b4c675faeef901c4 (diff) | |
download | musl-a663c930196b50194921e7ee685d0704ac32f6f4.tar.gz musl-a663c930196b50194921e7ee685d0704ac32f6f4.tar.bz2 musl-a663c930196b50194921e7ee685d0704ac32f6f4.tar.xz musl-a663c930196b50194921e7ee685d0704ac32f6f4.zip |
adjust fallback INFINITY definition for FLT_EVAL_METHOD==2 case
on archs with excess precision, the floating point constant 1e40f may
be evaluated such that it does not actually produce an infinity.
1e5000f is sufficiently large to produce an infinity for all supported
floating point formats. note that this definition of INFINITY is only
used for old or non-GNUC compilers anyway; despite being a portable,
conforming definition, it leads to erroneous warnings on many
compilers and thus using the builtin is preferred.
-rw-r--r-- | include/math.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/math.h b/include/math.h index ec04a8a7..bbee62e2 100644 --- a/include/math.h +++ b/include/math.h @@ -16,7 +16,7 @@ extern "C" { #define INFINITY __builtin_inff() #else #define NAN (0.0f/0.0f) -#define INFINITY 1e40f +#define INFINITY 1e5000f #endif #define HUGE_VALF INFINITY |