summaryrefslogtreecommitdiffhomepage
path: root/src/dump.c
diff options
context:
space:
mode:
authorcremno <[email protected]>2015-07-29 21:54:06 +0200
committercremno <[email protected]>2015-08-17 20:39:24 +0200
commitad50a6c4103b6a95e25ed7eaaf99b79a220d36cf (patch)
tree0c6e315ee6aa62c3a9d8af571a6fda5813f5f555 /src/dump.c
parenta1731254bee12c831ea1d509bf43520db1d0d9af (diff)
downloadmruby-ad50a6c4103b6a95e25ed7eaaf99b79a220d36cf.tar.gz
mruby-ad50a6c4103b6a95e25ed7eaaf99b79a220d36cf.zip
fix irep float dump format string for MRB_USE_FLOAT
IEC 60559 single format has 6 to 9 significant decimal digits precision. However the printf conversion specifier e (and E, of course) already writes 1 digit - the one before the decimal point - and precision specifies the number of digits to write after the decimal point.
Diffstat (limited to 'src/dump.c')
-rw-r--r--src/dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dump.c b/src/dump.c
index 462e036b4..734f38043 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -16,7 +16,7 @@
#define FLAG_BYTEORDER_NONATIVE 0
#ifdef MRB_USE_FLOAT
-#define MRB_FLOAT_FMT "%.9e"
+#define MRB_FLOAT_FMT "%.8e"
#else
#define MRB_FLOAT_FMT "%.16e"
#endif