POV-Ray : Newsgroups : povray.general : Re: Probably been asked... Why no power operator? : Re: Probably been asked... Why no power operator? Server Time
5 Aug 2024 12:16:08 EDT (-0400)
  Re: Probably been asked... Why no power operator?  
From: Tor Olav Kristensen
Date: 14 Nov 2002 20:00:07
Message: <web.3dd4440dc24ffac838149fba0@news.povray.org>
Christopher James Huff wrote:
>In article <3dd3cb3c$1[at]news.povray.org>, "Slime" <slm### [at] slimelandcom>
>wrote:
.....
>> Besides, I would think that since we're adding ^ as a new operator, we could
>> give it whatever precedence we wanted, and it just seems more logical to me
>> to make it work the way we've been taught it should work than to allow the
>> 2^-3 syntax just for convenience.
>
>Not for convenience, for self consistency. There isn't an existing rule,
>so the one that was most logical and consistent was chosen.

How about just requiring that the hat
operator should always be preceeded
by a pair of parantesis.

Like this:   ( )^

E.g.:   (3)^-3 or (-4)^2


Tor Olav


Post a reply to this message

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