"^" on numbers should be right-associative
Open
Nobody has claimed this yet.
Core
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
According this document the operator ^ is left associative. I don't know about the other overloaded types, but for numbers it should be right associative. The following is wrong
i1 : 3^3^3
o1 = 19683
The correct answer is
i2 : 3^27
o2 = 7625597484987
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Macaulay2's parser or operator-precedence implementation for ^, then check how associativity is tested. Use the issue's 3^3^3 examples as the expected behavior: numeric exponentiation should evaluate as 3^(3^3) while the effect on other overloaded types remains to be verified.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100