|
|
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > So, I did some more testing, wrote a simple, standalone sample scene, and found
> > yet another curious set of circumstances.
> >
> > And it looks like probably what's happening is another case of floating point
> > math error, similar to what I experienced way back when trying to use fractional
> > loop iterators.
> >...
>
> But, but, but - you are using a "fractional loop iterator" also here.
> You are incrementing by a number; 0.05 = 5/100, that's not possible to write
> as a binary number with a finite length.
>
> 0.05 =
> 0*10^0+0*10^-1+5*10^-2 =
> 0*2^0+0*2^-1+0*2^-2+0*2^-3+0*2^-4+1*2^-5+1*2^-6*+0*2^-7+0*2^-8+1*2^-9+1*2^-10+...
>
> Try to use this step length instead:
>
> #declare Step = 0.0498046875; // = 1/2^-5 + 2^-6 + 2^-9 + 2^-10
Sorry. I meant to write this:
// = 2^-5 + 2^-6 + 2^-9 + 2^-10
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
Post a reply to this message
|
|