From ad50a6c4103b6a95e25ed7eaaf99b79a220d36cf Mon Sep 17 00:00:00 2001 From: cremno Date: Wed, 29 Jul 2015 21:54:06 +0200 Subject: [PATCH] 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. --- src/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dump.c b/src/dump.c index 462e036b4c..734f380439 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