Support for unicode operators, especially superscripts like ²

Issue #698 invalid
Former user created an issue

Dear Helder,

on my keyboard, if I type ^2, I get the Unicode U+00b2 character, named 'Superscript two' or 'squared'. Then, SpeedCrunch 0.10.1 (Ubuntu 16) nicely shows, e.g. (3+2)² but it does not calculate it like this; the result is simply 5, not 25. Same for ³ and the extended set of superscripts at U+2074 etc. It seems that all "unknown" characters are taken as starting a comment.

Would be great if SpeedCrunch would interpret these as ^2, ^3, etc!

For more complicate expressions than the one above, it is not obvious from the result that the " ² " etc is ignored; also the colorization could be interpreted as " ² " being a valid operator (same color as "+", "*" etc.). So one might get an incorrect result without noticing. I would suggest that " ² " should either calculate the square or it should be impossible to enter that character.

Sometimes, support for more Unicode characters would be great when pasting equations from text to SpeedCrunch:

  • multiplication symbol "×"
  • middle dot U+00b7 "·", multiplication dot U+2219 and U+22C5 also for 'multiply'
  • division slash U+2215
  • root symbols U+221A to U+221C
  • fractions ¼, ½, ¾; maybe (though less popular) also the extended set at U+2150 etc.
  • The division symbol "÷" might be problematic; it seems that this can be misinterpreted as 'minus' in some countries: https://en.wikipedia.org/wiki/Obelus

Thank you!

Michael

Comments (2)

  1. Log in to comment