POV-Ray : Newsgroups : povray.text.scene-files : power notation change in POV3.6? : Re: power notation change in POV3.6? Server Time
17 May 2024 22:59:13 EDT (-0400)
  Re: power notation change in POV3.6?  
From: Mike Williams
Date: 18 Sep 2006 08:18:10
Message: <vPNYMGAGvoDFFwTD@econym.demon.co.uk>
Wasn't it Data Banks who wrote:
>Fixed it :)
>
>#declare accel= pow(2*clock,4)*20.5;
>#declare lift=  pow(2.0*clock,(1/5));
>#declare Powerup =  pow(5.0*clock,(1/10))/100;

It all seems to have come about due to a rather pedantic disagreement
about the order of precedence of the ^ operator. Rather than just pick a
precedence order and tell anyone who wanted a different order to just
live with it, the ^ operator got ditched.

a*b^c*d might mean different things depending on the order in which the
operators are applied, but with pow() you write a*pow(b^c)*d or
pow(a*b,c*d) and there's no ambiguity.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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