[Tutor] Why doesn't this work??
Deirdre Saoirse
deirdre@deirdre.net
Mon, 31 Jul 2000 16:30:55 -0700 (PDT)
On Mon, 31 Jul 2000, Daniel Yoo wrote:
> Mod actually does work on floating point numbers. The problem that
> you're encountering has to do with limited precision. That is, the
> larger the number becomes, the less precise the number becomes.
Let's put it this way: if the results aren't reliable, it doesn't *work.*
OK? :) It's one of those things like comparing floating point numbers that
appear equal (but aren't) that will get you in a world of hurt if you make
assumptions. Much better to use ONLY integers with functions like mod.
--
_Deirdre * http://www.sfknit.org * http://www.deirdre.net
"We can always count on the British. Except for the Revolutionary War
they've been perfect." -- Mel Brooks, on the first Concorde flight since
the Paris crash.