How to add calculations to the gnome search bar?
Solution 1:
I found this from Built-in calculator to GNOME search window
The pre-installed GNOME Calculator in Ubuntu 18.04 is a snap application which may lack some features provided by the traditional one due to restrictions of snap packages.
Remove the snap application by running
snap remove gnome-calculator
and install the traditional apt one by running
sudo apt install gnome-calculator
You may need to to restart GNOME shell by hitting Alt+F2, then typing r and pressing Enter for it to take effect.
Solution 2:
It works for me in Ubuntu 17.10 (and Wayland) with double parentheses, which is used also on the command line
$ echo "$((1+2))"
3
So try
((1+2))
See this screenshot,
After an update & upgrade it works without parentheses and with single parentheses too,
1+2
(1+2)
Please notice that AskUbuntu is not intended for the developing release. But you are welcome to participate in the development or testing via other web sites. See this link,
Ubuntu Development version / How to participate