8/2(2+2) evaluated wrong

Issue #1054 duplicate
Former user created an issue

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)

  1. Mathieu Carbou

    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)

  2. gilga

    @Levente Kovacs It IS equal (to 9 as expected). You probably have an outdated version of Speedcrunch.

  3. Levente Kovacs

    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.

  4. Log in to comment