- changed title to Bug with Implicit multiplication with parentheses
Bug with Implicit multiplication with parentheses
Issue #1155
closed
The bug: The calculation is false when not using the multiplication sign.
How to reproduce it:
2×(7.5−0.5)+4×(12−0.75)
result:
59
But:
2(7.5−0.5)+4(12−0.75)
(so, idem as before but without multiplication sign):
result:
202.5
I don’t even know how this calculation was done by Speedcrunch to get this result !
Note that:
2(7.5−0.5)
gives the correct result (“14”) and also
4(12−0.75)
which gives: “45”.
But using this term on the same line gives the previous error as mentioned above.
Version: SpeedCrunch master (Qt 5.15.6)
This is the git version.
Comments (7)
-
reporter -
reporter - edited description
-
reporter - edited description
-
The calculation performed is
(2×(7.5−0.5) + 4)×(12−0.75)
The same behaviour is present in latest nightly https://github.com/Tey/speedcrunch-nightlies/releases/tag/2020-06-30-7cf8cfb1
-
reporter @Southisup Good catch! Thanks.
-
- changed status to resolved
Fix
#1155→ <<cset 22cb6bfb3d05>>
-
- changed status to closed
Fixed in code, thanks for reporting.
- Log in to comment