You can use Siri Search on iOS as a calculator, which works the same way as Finder on a Mac — this keeps track of the entire expression when you’re doing it
With the added benefit of having to press not just one, but two buttons in order to add a "+" sign. First press "123", then press "#+=" and now you can add your complex mathematical characters :)
If I have to use the default keyboard to enter arithmetic expressions, I'd rather SSH to my own server. I'm not exactly sure of the privacy implications of typing things into Siri.