POV-Ray : Newsgroups : povray.text.scene-files : power notation change in POV3.6? : Re: power notation change in POV3.6? Server Time: 24 Jul 2008 13:05:49 GMT
  Re: power notation change in POV3.6?  
From: Mike Williams
Date: 18 Sep 2006 12:18:10
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 1991-2004 POV-Team™