POV-Ray : Newsgroups : povray.newusers : rounding and logic functions : Re: rounding and logic functions Server Time
19 May 2024 15:30:19 EDT (-0400)
  Re: rounding and logic functions  
From: Alain
Date: 4 Aug 2013 22:05:59
Message: <51ff0887$1@news.povray.org>


>> I'd expect mention of exponential functions in the precedence listing.
>> I'd also point out that (A^2) is not a valid expression - pow(x,2) is
>> the way to
>> write that in POV-Ray.  And don't confuse pow() with pwr().
> It's because the caret "^" operator can often become ambiguous.
> What do you *realy* mean if you have 2^2/3?
> It can be 2^(2/3) OR be (2^2)/3.
> or what about 2^3^4...
> It can be 2^(3^4) OR (2^3)^4.
> In both cases, the result are NOT the same.
> Depending on your background, or domain of work/activity, it can be
> evaluated either right to left or left to right.

Should have added some spaces...

What do you *realy* mean if you have 2^ 2/3?
It can be 2^(2/3) OR be (2^ 2)/3.
or what about 2^ 3^ 4...
It can be 2^(3^ 4) OR (2^ 3)^ 4.


Post a reply to this message

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