News for hackers. Stuff that matters.
Re:Modern Python Performance Considerations by gjm11 on Thursday May 05, 2022 @03:56PM (#31277773)
They also expect 1/3 + 1/3 + 1/3 == 1. Decimals won't help with that.
Re:Modern Python Performance Considerations by kbenson on Thursday May 05, 2022 @04:14PM (#31277927)
That's slightly different in that most programmers won't read 1/3 as "one third" but instead "one divided by three", and interpret that as three divisions added together, and the expectations are different. Seeing a constant written as a decimal invites people to think of them as decimals, rather than the actual internal representation, which is often "the float that most closely represents or approximates that decimal".