Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

MicroPython • Re: int() doing odd things.

$
0
0
DBL_DIG is 15 for 64 bit floats. So 0.3 is OK to print I think.

Use decimal arithmetic instead of binary if you need accurate results for things like 0.1 + 0.2
MicroPython 1.25 — about which the OP was asking — uses single-precision by default, and does not have the Decimal module

Statistics: Posted by scruss — Mon Apr 28, 2025 9:50 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles