Skip to content

CalculatorApplet

Travis Goodspeed edited this page Jul 31, 2018 · 1 revision

The RPN Calculator applet functions as a handy little calculator within the watch. It features a 10-level stack of 8 digit values.

Press numbers will place them into the entry register, and the = button will push that number onto the stack. Pressing /, *, -, or + will apply that operation to the top two numbers on the stack, replacing them with the result.

Currently, the calculator only functions with integers. In the future, we would like to add support for BCD floats, but will not add support for binary floats, as they are unable to accurately express such common numbers as 0.2.

Power Management

The watch CPU will briefly jump to 1MHz by a call to ucs_fast() during calculations in the ->keypress() handler, then drop back to slow speed with a call to ucs_slow() before returning. Older versions of the calculator would remain in fast mode, which could be seen by the multiplication icon being set.

Clone this wiki locally