• Marius Gerbershagen's avatar
    format: fix exponential floating point output · 2b7d0bdb
    Marius Gerbershagen authored
        sys::scale-exponent was not working correctly and outputting
        numbers in the wrong range. Furthermore, using sys::scale-exponent
        for scaling the number to the correct range is flawed anyway,
        since it introduces rounding errors. Hence we replace
        sys::scale-exponent by the much simpler sys::exponent-in-base10
        function and fix the logic in format-exp-aux to scale using
        sys::flonum-to-string, which is rounding error free. Moreover,
        sys::flonum-to-string was buggy and not rounding numbers correctly
        when the 'd' parameter was given, which has also been fixed.
        Fixes #437.
    2b7d0bdb
Name
Last commit
Last update
..
bdwgc Loading commit data...
c Loading commit data...
clos Loading commit data...
cmp Loading commit data...
doc Loading commit data...
ecl Loading commit data...
gmp Loading commit data...
h Loading commit data...
libffi Loading commit data...
lsp Loading commit data...
newcmp Loading commit data...
tests Loading commit data...
util Loading commit data...
Makefile.in Loading commit data...
aclocal.m4 Loading commit data...
bare.lsp.in Loading commit data...
compile.lsp.in Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install.sh Loading commit data...