|
|
In article <3a811457$1@news.povray.org>, "Tom Melly"
<tom### [at] tomandlucouk> wrote:
> > Of course there is. It's called simple algebra.
> > a*x^2+b*x+c means what to you?
>
> (a*(x^2)) + (b*x) + c - but this is not common sense, it is following a
> convention that exists because common sense is not available.
>
> In fact, one could argue that the only common sense option is to evaluate
> the expression strictly left to right. IMHO common sense would dictate
> that the solution is: (a*x)^2 + (b*x) + c.
You still followed the precedece of * over +, I think it's even uglier:
((((a * x) ^ 2) + b) * x) + c
Unless you were only talking about individual terms.
I think my exponent patch (which allows you to use ^ for pow() in
ordinary scene code) breaks on this, instead of evaluating that as:
(a*(x^2)) + (b*x) + c
It will see:
((a*x)^2) + (b*x) + c
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|