Bug 496343 - Formulas with string expressions are not commutative: "sqrt(2) + 2" works, but "2 + sqrt(2)" fails
Summary: Formulas with string expressions are not commutative: "sqrt(2) + 2" works, bu...
Status: REPORTED
Alias: None
Product: krunner
Classification: Plasma
Component: calculator (other bugs)
Version First Reported In: 6.2.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-16 13:48 UTC by postix
Modified: 2024-11-20 20:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2024-11-16 13:48:31 UTC
STEPS TO REPRODUCE
1. Open krunner, type: 1 + sqrt(2) or 1 + sin(2)
2.  Try the same with sqrt(2) + 1 or sin(2) + 1

OBSERVED RESULT
1. It asks to search with $websearchengine 
2. It calculates correctly

Works fine with qalculate-qt, which uses the same lib.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241114
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Comment 1 Nate Graham 2024-11-19 19:11:48 UTC
This is an issue in Libqalculate, which is the library we use for mathematical calculations under the hood. Can you report this at https://github.com/Qalculate/libqalculate/issues? Thanks!
Comment 2 postix 2024-11-19 20:37:56 UTC
(In reply to Nate Graham from comment #1)
> This is an issue in Libqalculate, which is the library we use for
> mathematical calculations under the hood. Can you report this at
> https://github.com/Qalculate/libqalculate/issues? Thanks!

As I wrote
> Works fine with qalculate-qt, which uses the same lib.

two things come in my mind: this is either a regression in Libqalculate, no one has reported yet OR this is a parsing error in krunner and I assume it's the latter.
Comment 3 Nate Graham 2024-11-20 20:39:43 UTC
Eek, sorry for missing that part.