Eleanor McHugh wrote: > On 15 Nov 2009, at 00:42, Marnen Laibow-Koser wrote: >> >> Well, error accumulates pretty quickly in IEEE 754 floats, and >> trajectories require lots of calculation. I wouldn't trust floats >> in a >> situation like that -- would you? > > In a hardcore physics simulation with many forces then no I wouldn't, > but in a simple game then yes I'd probably go with floating-point :) Why? I can't see a single reason to use IEEE floats, unless you've done benchmarks and are absolutely certain that it's causing a performance problem. (Ward Cunningham did just that on a computationally intensive Smalltalk application that used fixed-point for all math -- and found that he couldn't even measure a difference in performance.) IEEE floats have no advantages that I can see and huge disadvantages. I just don't see them as being even slightly appropriate or useful for math. > > > Ellie > > Eleanor McHugh > Games With Brains > http://slides.games-with-brains.net > ---- > raise ArgumentError unless @reality.responds_to? :reason Best, -- Marnen Laibow-Koser http://www.marnen.org marnen / marnen.org -- Posted via http://www.ruby-forum.com/.