8/2(2+2) evaluated wrong
Issue #1054
duplicate
8/2(2+2) the steps to calculate this are 8/24 44=16 however on the second step it multiplies the 4 with 2 8/8 = 1
Comments (6)
-
-
- changed status to duplicate
Duplicate of
#860. -
It has been fixed in trunk already, you can try the development builds if you need the fix.
-
This is with 0.12
6/2(1+2)
= 1
6/2*(1+2)
= 9
These should be equal.
-
@Levente Kovacs It IS equal (to 9 as expected). You probably have an outdated version of Speedcrunch.
-
I tried with the tip of master and it is. As stated, I have 0.12 from Debian stable, but I guess this fix is not included in 0.12.
- Log in to comment
To add on this issue, it also seems it treats “x” and no multiply operator differently, and this rule is not explained in the user guide at https://speedcrunch.org/userguide/syntax.html#operators-and-precedence. This is probably a “hidden” undocumented way of SpeedCrunch to favor distribution over multiplication and division but the programmed rule is not explicitly written in the doc.
The only doc SpeedCrunch has is:
According to the doc a*b == ab : multiplication. There no concept of distribution explained.
It is like SpeedCrunch treats no “x” as a “distribution” operation that would have a higher priority than a division. Even if one could argue that such behaviour allows for shorter notation by being able to get rid of the parenthesis since 8/2(2+2) == 8/[2(2+2)], IMO this is wrong because it can lead to a different result when dome copies formula from an external place that is interpreting the rules correctly, where a missing x is an implicit x (which should be the rule, and this is what is documented also).
Wolfram: https://www.wolframalpha.com/input/?i=8%2F2(2%2B2)