From f9a2a6369d67788a287a985a2d231bb8e3ccd60d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 29 Jul 1999 22:34:58 +0000 Subject: Update. 1999-07-29 Andreas Schwab * misc/efgcvt.c (NDIGIT_MAX): Provide precomputed constants for all floating point formats supported by gcc. Error out for unhandled precisions. * misc/efgcvt_r.c (NDIGIT_MAX): Likewise. * misc/qefgcvt.c (NDIGIT_MAX): Likewise. * misc/qefgcvt_r.c (NDIGIT_MAX): Likewise. --- misc/efgcvt_r.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'misc/efgcvt_r.c') diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index d73fd22f70..80770e6a82 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -32,8 +32,14 @@ # define FLOAT_NAME_EXT # if DBL_MANT_DIG == 53 # define NDIGIT_MAX 17 +# elif DBL_MANT_DIG == 24 +# define NDIGIT_MAX 9 +# elif DBL_MANT_DIG == 56 +# define NDIGIT_MAX 18 # else -/* See IEEE 854 5.6, table 2 for this formula. */ +/* See IEEE 854 5.6, table 2 for this formula. Unfortunately we need a + compile time constant here, so we cannot use it. */ +# error "NDIGIT_MAX must be precomputed" # define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * DBL_MANT_DIG + 1.0))) # endif #endif -- cgit v1.2.1