aboutsummaryrefslogtreecommitdiff
path: root/misc/qefgcvt_r.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-29 22:34:58 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-29 22:34:58 +0000
commitf9a2a6369d67788a287a985a2d231bb8e3ccd60d (patch)
treefc23f678bc8a12e4023a4a6bcca5f3dba6e51f44 /misc/qefgcvt_r.c
parentdbc75fb3ccd8626ddedd2fe0f3621166059a8c80 (diff)
downloadglibc-f9a2a6369d67788a287a985a2d231bb8e3ccd60d.zip
glibc-f9a2a6369d67788a287a985a2d231bb8e3ccd60d.tar.gz
glibc-f9a2a6369d67788a287a985a2d231bb8e3ccd60d.tar.bz2
Update.
1999-07-29 Andreas Schwab <schwab@suse.de> * 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.
Diffstat (limited to 'misc/qefgcvt_r.c')
-rw-r--r--misc/qefgcvt_r.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/misc/qefgcvt_r.c b/misc/qefgcvt_r.c
index 5ff8110..040193b 100644
--- a/misc/qefgcvt_r.c
+++ b/misc/qefgcvt_r.c
@@ -26,8 +26,16 @@
#define FLOAT_NAME_EXT l
#if LDBL_MANT_DIG == 64
# define NDIGIT_MAX 21
+#elif LDBL_MANT_DIG == 53
+# define NDIGIT_MAX 17
+#elif LDBL_MANT_DIG == 113
+# define NDIGIT_MAX 36
+#elif LDBL_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 * LDBL_MANT_DIG + 1.0)))
#endif