diff options
author | Sverker Eriksson <[email protected]> | 2018-01-15 19:13:15 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-01-15 19:53:28 +0100 |
commit | c81c01da7b4870aa56cc38d865cd081f9bb800bc (patch) | |
tree | 839e7351947b086907ccbe81199b43b2694c7cc2 /system/doc/system_architecture_intro | |
parent | a8aeed346d0be42161a2563a09a4745b40d330ee (diff) | |
download | otp-c81c01da7b4870aa56cc38d865cd081f9bb800bc.tar.gz otp-c81c01da7b4870aa56cc38d865cd081f9bb800bc.tar.bz2 otp-c81c01da7b4870aa56cc38d865cd081f9bb800bc.zip |
erts: Fix float_to_list(F, [{decimals,D}]).
Example symptom:
1> float_to_list(0.145, [{decimals,1}]).
"0.2"
There were two problems in sys_double_to_chars_fast
1. Most serious was adding 0.55555555 / (10^D) instead of 0.5 / (10^D)
which imposed a 5.5% risk of a faulty rounding up.
2. Using fixpoint for frac_part which lost significant bits if F < 0.5
Diffstat (limited to 'system/doc/system_architecture_intro')
0 files changed, 0 insertions, 0 deletions