POV-Ray : Newsgroups : povray.off-topic : The trick : Re: The trick Server Time
6 Sep 2024 07:16:26 EDT (-0400)
  Re: The trick  
From: Invisible
Date: 13 Mar 2009 07:24:53
Message: <49ba4285$1@news.povray.org>
>> How about these?
>>
>> ABC+*DE+*F*
>> ABC+DE+**F*
> 
> such rewriting indeed works for any operator $ that satisfies 
> (A$B)$C=A$(B$C) i.e. AB$C$=ABC$$ in RPN.

So... any associative operation then?

A quick check confirms that

   ABC*-DE*-F- ==> (A-(B*C))-(D*E)-F   ==> A - BC - DE - F
   ABC*DE*--F- ==> (A-((B*C)-(D*E)))-F ==> A - BC + DE - F

which aren't the same.

> BTW Why did you choose this example with such a lot or irrelevant detail?

My brain is like mush this morning. This was the first correct example I 
could find. It's about 10 years ago that I discovered this effect, so I 
wasn't even sure if I was remembering right!

(Currently attempting to build a Haskell parser, printer and type 
interence engine. This stuff is surprisingly non-trivial. Having an 
argument about RPN in parallel with these activities is exceeding my 
mental capacity!)


Post a reply to this message

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