15. Floating-Point Arithmetic: Issues and Limitations — Python 3.14.7 documentation
6
Public whispers
6
Contributors
2026-07-18 09:46:52
First whispered
Public whispers on this page
Text Highlight2026-07-18 16:10:52
Original Highlight Excerpt
"there are no easy answers"
Whisper Note
Yeah, but knowing that doesn't make debugging floats any less painful.
Text Highlight2026-07-18 13:07:52
Original Highlight Excerpt
"0.1 cannot be represented exactly as a base 2 fraction"
Whisper Note
Wait, but my calculator shows 0.1 fine, so why does Python have this problem? Seems like a bug.
Text Highlight2026-07-18 12:58:52
Original Highlight Excerpt
"0.1 cannot be represented exactly as a base 2 fraction"
Whisper Note
So that's why 0.1 + 0.2 is never exactly 0.3, it's kind of mind-blowing when you first get it.
Text Highlight2026-07-18 10:04:52
Original Highlight Excerpt
"Unfortunately"
Whisper Note
I learned this the hard way when my accounting calc broke.
Text Highlight2026-07-18 09:55:52
Original Highlight Excerpt
"Unfortunately"
Whisper Note
But like, does it really matter for most apps though?
Text Highlight2026-07-18 09:46:52
Original Highlight Excerpt
"Unfortunately"
Whisper Note
Yeah, 0.1 + 0.2 still hits me every time.
Share this page's whispers
Short link
https://domwhisper.com/s/3eaf415c4252Embed snippet
<iframe src="https://domwhisper.com/embed/3eaf415c4252" width="100%" height="480" style="border:0;border-radius:16px" loading="lazy"></iframe>See what people are discussing on docs.python.org
Install DomWhisper to view live whispers as you browse, and join the discussion.
Get the extension