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
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!
(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.
Eek, sorry for missing that part.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6499
Git commit e7ec6ff1651dc3850c168d13da0166a317d365f5 by Nate Graham, on behalf of Alex Cizinsky. Committed on 17/04/2026 at 14:08. Pushed by ngraham into branch 'master'. runners/calculator: Don’t require math functions to be at the beginning or contain only letters When the runner query does not start or end with `=`, a regex is used to try to match math function signatures. Currently this regex requires the function to be at the beginning of the query and only contain letters. This causes queries like `1+sqrt(4)`, `log10(1000)` or `atan2(1,2)` to not display any results. This change updates the regex to match functions anywhere in the query. Additionally it also allows matching functions that contain digits (e.g. log10()). Note that digits in the function name are allowed only at the end, this causes functions that have a digit in the middle of their name (according to the qalculate function list there are only two such functions: `matrix2vector` and `unix2date`) to still fail to match, however they still may be used by prefixing the query with `=`. Also trying to match functions with digits in the middle of their name would just introduce more complexity. M +8 -0 runners/calculator/autotests/calculatorrunnertest.cpp M +1 -1 runners/calculator/calculatorrunner.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/e7ec6ff1651dc3850c168d13da0166a317d365f5
Thank you so much! <3