That worked.
Here is my basic BC math operator (based on wiki page):
# general math prompt to operate on selection (using bc)
define-command -params 0..1 -docstring "calculate math expression with bc. additional expressions as optional arg." \
math-bc %{
set-register \" %sh{ echo "$kak_selection$1" | bc }
}
map global normal = ': math-bc<ret>' -docstring "math eval"
map global normal <a-=> ':prompt math: %{ math-bc "%val(text)" }<ret>' -docstring "math prompt"
Do you know how I could get this to work on multiple selections, like with eval -itersel?