POV-Ray : Newsgroups : povray.general : Problems with iterations : Re: Problems with iterations Server Time
31 Jul 2024 08:24:40 EDT (-0400)
  Re: Problems with iterations  
From: Warp
Date: 11 Jan 2008 02:25:46
Message: <478719f9@news.povray.org>
SharkD <nomail@nomail> wrote:
> #local increment = 1/radii;

  That's not an integer.

>  #local i = i + increment;

  And thus your loop counter isn't either.

> If "increment" is indeed stored as a float, shouldn't "6 * increment" evaluate
> to the same number as "increment + increment + increment + increment +
> increment + increment"?

  No. We are talking about floating point numbers with limited number of bits.
That kind of thing is *not* guaranteed at all.

-- 
                                                          - Warp


Post a reply to this message

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