alex23 <wuwe...@gmail.com> writes: > Paul Rudin <paul.nos...@rudin.co.uk> wrote: >> Apparently Eve Online is (stackless) python. > > I've dropped a ridiculous number of hours into EVE this year alone but > I'd be very hesitant to ever mention "best" in relation to its > coding :) > > It uses way too much floating point incorrectly, the in-game > calculator gives the result of 878.53 - 874.20 as 4.3299999999999. I'm > pretty sure this is also why occasionally you'll be left with 1 0.01m3 > unit out of 39,0000 with the storage container complaining it's full > at 38,9999.99. >
Floating point arithmetic isn't, in general, precise. I don't know the game, so I can't comment on whether they should have chosen to ensure precision in this context, but presumably that would make things a little slower. -- http://mail.python.org/mailman/listinfo/python-list