Bug 473674

Summary: Kalk calculates wrongly if there is no multiplication sign before parenthesis.
Product: [Applications] Kalk Reporter: mustafa.eskieksi
Component: GeneralAssignee: hanyoung
Status: ASSIGNED ---    
Severity: normal CC: espidev, hedim74889
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: wrong calculation

Description mustafa.eskieksi 2023-08-23 10:27:49 UTC
Created attachment 161135 [details]
wrong calculation

SUMMARY
Kalk calculates "6/2(2+1)" as 1 but the real answer is 9, however it calculates correctly when I enter a multiplication sign before parenthesis: "6/2*(2+1)" gives 9.


STEPS TO REPRODUCE
1. Open kalk
2. Write "6/2(2+1)" or something like "5/1(5)"
3. Compare results with same operations but with multiplication sign (like "6/2*(2+1)")

OBSERVED RESULT
Results are wrong without multiplication sign.

EXPECTED RESULT
Results shouldn't differ when multiplication sign is not entered.

SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
Linux/KDE Plasma: 
Kernel: 6.4.11-arch2-1 (64-bit)
Graphics Platform: X11
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Comment 1 Bug Janitor Service 2023-08-26 12:58:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kalk/-/merge_requests/66
Comment 2 hanyoung 2023-08-28 15:10:39 UTC
I disabled implicit multiply, because whenever I tried to fix it, I break something else. Is this okay for you?
Comment 3 hanyoung 2023-09-06 14:29:51 UTC
*** Bug 474201 has been marked as a duplicate of this bug. ***