Re:Why Python's Integer Division Floors (2010)
by DonHopkins on Wednesday February 28, 2024 @09:07AM
(#39538095)
Who would have ever thought that division could be so ... divisive?
Re:Why Python's Integer Division Floors (2010)
by kragen on Wednesday February 28, 2024 @09:19AM
(#39538248)
as sophie w. arm said, 'i have a multiplier, not a divider'
Re:Why Python's Integer Division Floors (2010)
by DonHopkins on Wednesday February 28, 2024 @10:34AM
(#39539269)
At the RISC of sounding short on instructions, do you mean Sophie Wilson's ARM? ;)
i haven't read the rationale, but presumably the committee did this because it's what virtually all cpus do (because it's what fortran does), so it's the only thing that can be implemented efficiently on virtually any cpu with a division instruction, and so virtually all c implementations did it, and standardizing the behavior of virtually all c implementations is better than leaving it implementation-defined or standardizing a behavior that conflicts with virtually all existing implementations and can't be implemented efficiently on most high-end hardware