Commit aa5ed8bc authored by Marius Gerbershagen's avatar Marius Gerbershagen Committed by Daniel Kochmański

printer: ensure that we generate enough digits for floats

When the number of digits was not specified, we were sometimes
outputting a number that was exactly halfway between the exact value
and the next higher float. When reading that number in again, one
would get a different value due to rounding issues. Therefore, we now
always output enough digits, so that the number can be reconstructed
unambigously. Fixes #500.
parent 8a82b9fc
Pipeline #59816805 passed with stage
......@@ -59,7 +59,7 @@ setup(cl_object number, float_approx *approx)
default:
break;
}
approx->low_ok = approx->high_ok = ecl_evenp(f);
approx->low_ok = approx->high_ok = 0;
if (e > 0) {
cl_object be = EXPT_RADIX(e);
if (limit_f) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment