News:

Let's find out together what makes a PIC Tick!

Main Menu

floating point numbers range

Started by basiclover, Jan 26, 2022, 07:25 AM

Previous topic - Next topic

basiclover

how to understand -1e37 to +1e38 to get -2147483646.999 to +2147483646.999 ?


tumbleweed

You can't. That's too many digits.

A 32-bit float only has about 6-7 decimal digits of precision as it uses a 23 bit mantissa.
That would limit you to something like 2.1474835e9, so you'd loose a lot of digits.

A 64-bit double could represent that range but that's only available in the 16-bit parts.


basiclover

thanks, I forgot the 32 bit manyissa