Unexpected behaviour of math.floor, round and int functions (rounding)
Grant Edwards
grant.b.edwards at gmail.com
Sat Nov 20 17:23:37 EST 2021
On 2021-11-20, Ben Bacarisse <ben.usenet at bsb.me.uk> wrote:
> You seem to be agreeing with me. It's the floating point part that is
> the issue, not the base itself.
No, it's the base. Floating point can't represent 3/10 _because_ it's
base 2 floating point. Floating point in base 10 doesn't have any
problem representing 3/10.
--
Grant
More information about the Python-list
mailing list