mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-26 06:22:33 -08:00
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.
This commit is contained in:
parent
8a82b9fcfb
commit
aa5ed8bc7b
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue