From: Seebs Date: 2010-01-15T17:00:14+09:00 Subject: Re: Float Points error On 2010-01-15, Phillip Gawlowski wrote: > You'll loose time when computing with Floats, anyway, since outside of > vector-based CPUs (IIRC), the performance of performing maths on floats > is terrible (in relative terms). This is nowhere near as true as it used to be. Some quickie tests on an x86 revealed that, for some common operations, floating point math was FASTER than integer! It depends a lot on what you're trying to do. Since modernish CPUs may well be able to do both float and integer operations simultaneously, an integer loop of floating point operations may be very fast... ... Of course, that doesn't necessarily tell you much about *Ruby* floats, where I'd expect FixNum to beat Float by a huge margin. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!