POV-Ray : Newsgroups : povray.off-topic : The trick : Re: The trick Server Time
6 Sep 2024 07:15:41 EDT (-0400)
  Re: The trick  
From: andrel
Date: 13 Mar 2009 06:55:21
Message: <49BA3B9B.9000006@hotmail.com>
On 13-3-2009 11:35, Invisible wrote:
> andrel wrote:
> 
>> Why not in (reverse) polish, no brackets at all
> 
> Fun thing:
> 
>   12+3*
>   123+*
> 
> These two expressions look different, but are guaranteed to produce the 
> same answer.
Until now I had never realized that even reversed polish could be 
interpreted in more than one way. Your interpretation might be 
consistent,though that might require some checking. I would say that the 
two expressions reduce to 9 and 5. Note that if you insist that 
parameters are eaten from left to right subexpressions are not substrings.


Post a reply to this message

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