Dan Ellis
6f4d424f46
py/formatfloat: Use pow(10, e) instead of pos/neg_pow lookup tables.
...
Rework the conversion of floats to decimal strings so it aligns precisely
with the conversion of strings to floats in parsenum.c. This is to avoid
rendering 1eX as 9.99999eX-1 etc. This is achieved by removing the power-
of-10 tables and using pow() to compute the exponent directly, and that's
done efficiently by first estimating the power-of-10 exponent from the
power-of-2 exponent in the floating-point representation.
Code size is reduced by roughly 100 to 200 bytes by this commit.
Signed-off-by: Dan Ellis <dan.ellis@gmail.com>
2022-08-12 23:53:34 +10:00
..
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2021-06-18 14:16:07 +10:00
2021-06-18 14:16:07 +10:00
2022-07-25 16:11:26 +10:00
2020-04-18 22:36:49 +10:00
2020-08-29 15:18:01 +10:00
2020-03-30 13:21:58 +11:00
2022-06-23 11:46:47 +10:00
2022-07-25 16:11:26 +10:00
2020-08-29 14:12:20 +10:00
2020-08-29 14:12:20 +10:00
2022-02-02 16:49:55 +11:00
2022-02-02 16:49:55 +11:00
2022-02-02 16:49:55 +11:00
2022-02-02 16:49:55 +11:00
2021-05-26 16:33:18 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2022-07-25 14:23:34 +10:00
2022-07-26 22:23:47 +10:00
2022-07-26 22:23:47 +10:00
2022-08-12 23:53:34 +10:00
2022-07-26 22:23:47 +10:00
2022-08-12 23:53:34 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2022-02-02 16:49:55 +11:00
2022-02-02 16:49:55 +11:00
2022-02-02 16:49:55 +11:00
2022-02-02 16:49:55 +11:00
2020-03-30 13:23:05 +11:00
2014-07-05 06:14:29 +01:00
2022-01-23 09:28:33 +11:00
2022-01-23 09:28:33 +11:00
2020-03-30 13:21:58 +11:00
2020-09-11 10:04:57 +10:00
2022-07-25 16:11:26 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-08-29 15:18:01 +10:00
2020-08-29 15:18:01 +10:00
2020-03-30 13:21:58 +11:00
2019-08-17 23:23:17 +10:00
2020-03-30 13:21:58 +11:00
2018-06-12 12:17:43 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2017-06-13 13:36:56 +10:00
2022-08-12 23:53:34 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2014-04-17 16:21:43 +01:00