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

--- Comment #4 from Gabriel Barrantes <gabriel.barrantes....@outlook.com> ---
(In reply to dargaard from comment #0)
> KCalc does not consistently follow the order of operations, leading to
> incorrect results for certain expressions (e.g., 8 - 3 * 2 + 1 evaluates to
> 1 instead of 3).
> 
> STEPS TO REPRODUCE
> I can reproduce this behavior with any question that has addition,
> subtraction, and multiplication. I have evaluated other calculations and get
> correct answers however questions that specifically have 3 steps which
> include addition, subtraction and multiplication generate incorrect answers,
> such as my example 8-3*2+1 evaluates to 1 instead of 3.
> 
> OBSERVED RESULT
> 8-3*2+1=1
> 
> EXPECTED RESULT
> 8-3*2+1=3
> 
> SOFTWARE/OS VERSIONS
> Kernel: 6.9.2-zen1-1-zen
> KDE Plasma Version: Plasma 6.0.5
> KDE Frameworks Version:  6.2.0
> Qt Version:  6.7.1
> 
> ADDITIONAL INFORMATION
> Just to make sure I wasn't making a human error I did the same test
> calculations using a physical calculator, and the android calculator, both
> of which gave correct answers, I also ran this by chat gpt just to see if it
> could find a mistake I was making and it agreed that Kcalc is giving
> incorrect answers.

The - operator has been tricky because sometimes acts as as binary (the
ordinary subtraction) and other times is unary (inverting the sign of the
number that is next to it), I submitted a patch and hopefully no more issues
will arise.
If any other input gives wrong results let me know, for sure we could use some
more testing since the feature is fairly new.

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

Reply via email to