For example:
1. When someone enters "1 / 3" how many decimal places you display in the result? My approach: use MAX(4, MAX(decimal_places(entered_values))). His approach: use 3 everywhere.
- Bonus 1: how many decimal places you display when someone enters "sin(3.14)"? What about "sin(1 / 3)"? My approach: use as much space you have on the screen.
- Bonus 2: how do decimal places propagate when you're using refs?
2. What to do when someone taps "=" on the expression where we already have a result? Chinese $2 hardware calculator approach: redo the last operation. My approach: do nothing. Tydlig's approach: insert last result as a ref.
3. What to do when someone enters huge numbers? My approach: trim them to the width of the screen, clearly displaying that, but keep the full figure when doing copy/paste or export to text. His approach: start using E-notation somewhere around 16th figure.
4. In an app like this there's a temptation to stop using cursor because calculators don't have it and you want to be backwards compatible with them. When you create a ref, how to make sure the destination of the ref is at the right position in the expression without introducing a cursor? I.e. how to make sure you're not getting "2 + 3 [ref] + 12" (you need an operator before "[ref]")? My approach: use a semi-rigid table, where operators are separated from operands. Tydlig's approach: use a little cursor, a part of the app I don't like, because your finger normally would block the cursor.
I can go on and on. Math-related stuff is hard.