aboutsummaryrefslogtreecommitdiff
path: root/misc/qefgcvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/qefgcvt.c')
-rw-r--r--misc/qefgcvt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/misc/qefgcvt.c b/misc/qefgcvt.c
index 2729dce..853252c 100644
--- a/misc/qefgcvt.c
+++ b/misc/qefgcvt.c
@@ -20,6 +20,9 @@
#define FLOAT_TYPE long double
#define FUNC_PREFIX q
#define FLOAT_FMT_FLAG "L"
-#define MAXDIG (LDBL_DIG + LDBL_MAX_10_EXP)
+/* Actually we have to write (LDBL_DIG + log10 (LDBL_MAX_10_EXP)) but
+ we don't have log10 available in the preprocessor. Since we cannot
+ assume anything on the used `long double' format be generous. */
+#define MAXDIG (LDBL_DIG + 12)
#include "efgcvt.c"