Closed
Description
The issues section is used only for bug reports. Please use the Discussions section to ask questions and share ideas and suggestions.
Describe the bug
Unlike in any other language I have checked, the precedence of %
(or mod
) used as a binary remainder operator is higher than * and /. As it is essentially a division operation, its precedence should be the same as * and /, as it is in essentially every other language checked.
To Reproduce
Evaluate 3.6 * 28 % 25
. Currently mathjs produces 10.8 = 3.6 * 3 = 3.6 * (28 % 25). It should produce 0.8 = 100.8 % 25 = (3.6 * 28) % 25, as multiplicative/division operators should be evaluated left to right.
Metadata
Metadata
Assignees
Labels
No labels