← index #11843Issue #15258
Related · high · value 3.829
QUERY · ISSUE

docs: non standard behaviour of float()

openby massimosalaopened 2023-06-22updated 2025-11-06
docs

See
https://github.com/micropython/micropython/issues/11735

The official page
https://docs.micropython.org/en/latest/genrst/builtin_types.html#float
should be updated about the different result of

float('_')

(and eventually other invalid inputs)
between Python and MicroPython.

CANDIDATE · ISSUE

docs: Document limited numerical precision

openby tdunningopened 2024-06-11updated 2025-03-03
docs

Documentation URL

No response

Description

Python normally uses double precision for all (floating point operations)[https://docs.python.org/3/library/numbers.html#numbers.Real]. MicroPython, depending on the platform, usually does not. This leads to surprises and errors, occasionally quite serious.

Unfortunately, this doesn't seem to be documented anywhere except in discussion groups.

I will create a pull request which attempts to deal with this lack.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied