diff options
Diffstat (limited to 'misc/qefgcvt_r.c')
-rw-r--r-- | misc/qefgcvt_r.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/misc/qefgcvt_r.c b/misc/qefgcvt_r.c index 66cc049ec8..d5b2a799b3 100644 --- a/misc/qefgcvt_r.c +++ b/misc/qefgcvt_r.c @@ -24,6 +24,7 @@ #define FUNC_PREFIX q #define FLOAT_FMT_FLAG "L" #define FLOAT_NAME_EXT l +#define FLOAT_MIN_10_EXP LDBL_MIN_10_EXP #if LDBL_MANT_DIG == 64 # define NDIGIT_MAX 21 #elif LDBL_MANT_DIG == 53 @@ -40,5 +41,16 @@ # error "NDIGIT_MAX must be precomputed" # define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * LDBL_MANT_DIG + 1.0))) #endif +#if LDBL_MIN_10_EXP == -37 +# define FLOAT_MIN_10_NORM 1.0e-37L +#elif LDBL_MIN_10_EXP == -307 +# define FLOAT_MIN_10_NORM 1.0e-307L +#elif LDBL_MIN_10_EXP == -4931 +# define FLOAT_MIN_10_NORM 1.0e-4931L +#else +/* libc can't depend on libm. */ +# error "FLOAT_MIN_10_NORM must be precomputed" +# define FLOAT_MIN_10_NORM exp10l (LDBL_MIN_10_EXP) +#endif #include "efgcvt_r.c" |