Re:Why Is Python So Popular in 2025? – The PyCharm Blog
by shagie on Wednesday October 01, 2025 @02:38PM
(#45441480)
https://0.30000000000000004.com/#rust
[ Parent
| on HN ]
Re:Why Is Python So Popular in 2025? – The PyCharm Blog
by tialaramex on Wednesday October 01, 2025 @03:00PM
(#45441804)
Er, yes, I'm aware why this happened, my point is that this happens in the hardware floating point, but Python is as slow as the non-accelerated big rationals in my realistic::Real (it's actually markedly slower than the more appropriate realistic::Rational but that's not what my existing benchmarks cared about)
Re:Why Is Python So Popular in 2025? – The PyCharm Blog
by rbanffy on Wednesday October 01, 2025 @03:19PM
(#45442045)
> this happens in the hardware floating point
Not really. It's a limitation of the IEEE floating point format used in most programming languages. Some numbers that look nice in base 10 don't have an exact representation in base 2.
Re:Why Is Python So Popular in 2025? – The PyCharm Blog
by shagie on Wednesday October 01, 2025 @03:56PM
(#45442589)
Rational numbers where the denominator is a multiple of the prime factors of the base have an exact fractional representation in that base.
1/3 doesn't have an exact representation in base 10 or base 2. 1/5th does have an exact representation in base 10 (0.2), but doesn't in base 2. 1/4th has an exact representation in base 10 (0.25) and in base 2 (0.01)