From: Marnen Laibow-Koser Date: 2009-11-16T01:42:38+09:00 Subject: Re: Trajectories Shot (Piotr Szotkowski) wrote: > Marnen Laibow-Koser: > >> Yeah, I tried longer runs as well and saw larger differences. >> I question the applicability of those to actual programs, though; >> even computationally intensive programs are going to be spending lots >> of time doing things other than number crunching. > > To clarify, I also believe BigDecimals should be used by default (when > one’s serious about the results’ acccuracy) until they are actually > determined to be a performance bottleneck. Yes, this is what I was trying to say. > There even was a motion > to make them the language default, but the resolution was that > the performance cost was way too large, and that most (if not all) > other general-purpose languages default to IEEE floats for exactly > this reason. > Interesting. >> Besides, what good are fast calculations if they're wrong? > > Well, if they’re slightly wrong, but a couple of times faster, they > might be good enough; the previous example in this thread was IMHO > a good one – you don’t usually need accurate float arithmetics in > action games, but you do often care for the performance gain. Perhaps. I would think you actually would want accurate math, but it depends on the game. > > — Shot, who wouldn’t mind if Ruby defaulted to BigDecimals :) Likewise. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.