reference-en
reference-en copied to clipboard
Float documentation error
There is an error in the float documentation. Instead of
"Floating-point numbers can be as large as 3.4028235E+38 and as low as -3.4028235E+38"
should be
"Floating-point numbers can be as large as 3.4028235E+38 and as low as 3.4028235E-38"
Actually, the page is correct. I think ThemoteoVarela meant to write "as small as 3.4028235E-38". However the page is incorrect to say that float has a better resolution than integer types. For values in the range 2^24 to 2^32 a uint32_t has better resolution than float. I suggest:
- "float can represent fractional numbers."
- "float can represent very large numbers but may not be perfectly accurate."
- "float arithmetic is slower than integer arithmetic unless the processor has a floating point unit. Few microcontrollers do."