|
![](/i/fill.gif) |
> It still writes '1.0', but this is intended behavior IIRC, the unary '-'
> has a higher precedence than the '^'.
This is silly, since for even n, (-x)^n = x^n (and for odd n the precedence
doesn't make a difference). So there's no reason you would ever want (-x)^n,
and to write -(x^n) you have to use parentheses. Also, in standard
mathematical notation, -x^n means -(x^n). IMO, unless there's some kind of
limitation in the parser that prevents unary operators from having lower
precedence than binary operators (or something similar), this should be
changed; the unary + and - operators should have the same precedence as the
binary ones.
Anders
--
light_source{6#local D=#macro B(E)#macro A(D)#declare E=(E-#declare
C=mod(E D);C)/D;C#end#while(E)#if(A(8)=7)#declare D=D+2.8;#else#if(
C>2)}torus{1..2clipped_by{box{-2y}}rotate<1 0C>*90translate<D+1A(2)
*2+1#else}cylinder{0(C-v=1).2translate<D+C*A(2)A(4)#end-2 13>finish
{specular 1}pigment{rgb x}#end#end#end-8;1B(445000298)B(519053970)B
(483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)}
Post a reply to this message
|
![](/i/fill.gif) |