Iterative exponentiation not evaluated correctly
Issue #448
invalid
Originally reported on Google Code with ID 448
Steps to reproduce:
Evaluate 3^3^3
Expected behavior:
Evaluates to 3^3*3, or 3^9, or 27^3, which is 19683
Experienced behavior:
Evaluates to 3^(3^3), or 3^27, which is 7.625597484987e12
Product version:
0.10.1
Operating system:
Windows
Additional Information:
Following the right to left order for operations of the same precedence, exponentiation
is evaluated incorrectly.
Reported by mfdeakin@cs.unc.edu
on 2013-09-20 23:47:23
Comments (7)
-
Account Deleted -
Account Deleted Reported by
helder.pereira.correia
on 2014-11-28 17:27:22 - Labels added: Type-Defect -
The current implementation is actually the correct way. Exponentiation is right associative, i.e.
3^3^3 = 3^(3^3)
.EDIT: removed typo
-
repo owner @polwel Absolutely, thanks for the link.
-
repo owner - changed status to invalid
-
repo owner - changed status to closed
-
repo owner - changed status to invalid
- Log in to comment
Reported by
helder.pereira.correia
on 2013-12-30 02:54:34 - Status changed:Accepted