POV-Ray : Newsgroups : povray.general : Array Question : Re: Array Question Server Time
9 Aug 2024 17:21:02 EDT (-0400)
  Re: Array Question  
From: Margus Ramst
Date: 2 Jun 2000 15:28:41
Message: <3937FD1B.D6427D09@peak.edu.ee>
"Chris S." wrote:
> 
> error:  no matching } in sphere_sweep, < found instead
> 

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).

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

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