3**(6-1*4)**2 is a bad test since (3**2)**2 happens to equal 3**(2**2)
When I use the 3**4**2 I had previously mentioned, your code returns 6561 ((3**4)**2) instead of 43046721 (3**(4**2)).
>perl -le"print 3**4**2" 43046721
In reply to Re^3: a timid approach to parsing arithmetic expressions in perl
by ikegami
in thread a timid approach to parsing arithmetic expressions in perl
by spx2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |