• 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
contrib Loading commit data...
examples Loading commit data...
msvc Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
CHANGELOG Loading commit data...
COPYING Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.in Loading commit data...
README.md Loading commit data...
appveyor.yml Loading commit data...
configure Loading commit data...