> to navigation > to content

Scripting Corner

JavaScript:
Calculator

DEG RAD GRA

Notes

  • This calculator follows basic algebraic rules (brackets before multiplication/division before addition/substraction).
  • The order of operands and functions is the same as in a formula, not 6 sin but sin 6.
  • The key deletes the last entered number.
  • The input 6(3+5) is automagically converted to 6×(3+5).
  • After calculating a result you can instantly use it for further calculations. Use the Ans key to get the last result into your current formula at any time.
  • If you entered a wrong operator you can replace it with another (correct) operator (6+−8 becomes 6−8).
  • Trigonometric functions are calculated in RAD mode, the radio buttons on top are not implemented yet.