https://bugs.kde.org/show_bug.cgi?id=497580

            Bug ID: 497580
           Summary: Wrong result for calculations of the form a-b*c+d+e
    Classification: Applications
           Product: kcalc
           Version: 24.08.3
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: evan.te...@gmail.com
          Reporter: keinanzeigenu...@gmail.com
                CC: gabriel.barrantes....@outlook.com
  Target Milestone: ---

SUMMARY
Any calculation where there is a subtraction of a product as the second term
and two additions or subtraction follow is wrong. The problem only occurs after
a second addition, i.e. a-b*c+d is calculated correctly, but a-b*c+d+e is not.
The sign of "d" gets inverted.


STEPS TO REPRODUCE
1. Enter "1-1*1+1". Result: 1. Correct.
2. Enter "1-1*1+1+0" Result: -1. Wrong. +1 would be correct.
3. Enter "4-2*2+100+10". Result: -90. Wrong. kcalc calculates with the sign of
the last operand inverted.

OBSERVED RESULT
Wrong calculation results.

EXPECTED RESULT
Correct calculation results.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.12.1-4-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × 12th Gen Intel® Core™ i7-1260P
Memory: 16.5 GB of RAM
Graphics Processor: Mesa Intel® Graphics

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to