diff options
author | Yoctopuce dev <dev@yoctopuce.com> | 2025-07-04 22:32:00 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-08-01 00:47:33 +1000 |
commit | e4e1c9f4132f839dac0291557d9b992f67577fd3 (patch) | |
tree | 2a8b07a6cdbb40ac6e9e4fa81ecdf4dbe8c0ba83 /py/objfloat.c | |
parent | ffa98cb0143c43af9f4c61142784a08a19f660c5 (diff) |
py/parsenum: Refactor float parsing code.
This commit extracts from the current float parsing code two functions
which could be reused elsewhere in MicroPython.
The code used to multiply a float x by a power of 10 is also simplified by
applying the binary exponent separately from the power of 5. This avoids
the risk of overflow in the intermediate stage, before multiplying by x.
Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
Diffstat (limited to 'py/objfloat.c')
0 files changed, 0 insertions, 0 deletions