Commit 95781fa0 authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

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 b6beaf26
......@@ -59,7 +59,7 @@ setup(cl_object number, float_approx *approx)
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