|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |