Incorrect ^ (raise) and ! (factorial) operators precedence

Issue #57 closed
Former user created an issue

Originally reported on Google Code with ID 57

What steps will reproduce the problem?
1. -3^2
2. -(3^2)
3. -3!
4. -(3!)

What is the expected output? What do you see instead?
1. and 2. should be equivalent, but 1. erroniously evaluates as "9" instead
of "-9" because it's considered as "(-3)^2".
The same logic happens with 3. and 4. ("6" instead of "-6").

Reported by helder.pereira.correia on 2007-06-25 23:50:02

Comments (3)

  1. Former user Account Deleted

    Reported by `helder.pereira.correia` on 2007-06-27 19:19:06 - Status changed: `Fixed`

  2. Log in to comment