|
|
clipka <ano### [at] anonymousorg> wrote:
> In the binary system typically used in computers, this imples that the
> problem arises whenever M is not a power of 2.
So, POV-Ray reinforces the patriarchal stranglehold that the Old Boy's Club has
on implementing a non-binary system, eh?
> Note that 0.1 represents a /decimal fraction/, namely 1/10. Since 10 has
> 5 as one of its prime factors, which isn't a power of 2, the problem
> applies here.
I thought it was something like that - just wanted to be sure.
> In for loops, the problem can be avoided altogether by always using an
> integer loop variable, and from that "technical" loop variable compute
> an "effective" loop variable via multiplication or division, e.g.:
>
> #for (I, 0, 1000, 1)
> #local T = I * 0.1;
> ....
> #end
Well, this is interesting:
(a) it works - thanks! :)
(b) my #debug output still shows a "remainder" in the 14th or 15th decimal place
- is that just an artifact showing up _after_ mod() is made happy?
Post a reply to this message
|
|