POV-Ray : Newsgroups : povray.newusers : rounding and logic functions : Re: rounding and logic functions Server Time
19 May 2024 13:58:03 EDT (-0400)
  Re: rounding and logic functions  
From: Alain
Date: 18 Aug 2013 17:00:26
Message: <521135ea$1@news.povray.org>

>
>> 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.
>
> That's the purpose of heirarchy.
>
> I'd write them the way you wrote them with the parentheses.
> I've always learned that ^ precedes /, so 2^2/3 would be (2^2)/3.

Yes, but many peoples will use that for 2^ (2/3) by only adding a space 
between the ^ and the second 2, space that will be ignored by the parser.

> But _allowing_ the use of a carat would be useful.
>
> I suppose I could something clever with an include file...
>
> [I can't believe I wrote that about abs... my brain must have been OFF!
>
>
The caret WAS supported in older versions but was removed. I still find 
some old, legacy, scenes using the caret operator. They cause errors 
that are resolved using the pow(x, y) format.


Post a reply to this message

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