POV-Ray : Newsgroups : povray.general : Array Question : Re: Array Question Server Time
9 Aug 2024 17:15:54 EDT (-0400)
  Re: Array Question  
From: David Fontaine
Date: 2 Jun 2000 16:44:13
Message: <39381BA1.B2E34F7A@faricy.net>
Margus Ramst wrote:

> It is a float precision problem (in decrementing of Next by 0.1). Because of it
> your loop goes through 11 iterations instead of 10. It' will work fine if you
> change Next to 10 and decrement it by 1 insted of 0.1
> Note that this is not a bug; floating point math is just not infinitely precise,
> and 0.1 is a problematic number, since it can't be presented accurately in
> binary notation (just like 1/3 in decimal).

Ah, I remember that crap... took me a while to figure it out when it happened to me.

It could happen to you, to. *points finger* ;-)

--
David Fontaine     <dav### [at] faricynet>     ICQ 55354965
Please visit my website: http://www.faricy.net/~davidf/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.