Negative Numbers
Note: This document applies to RPN mode only
Since RPN mode evaluates operators when they're typed, you cannot use the -
(subtract) unary operator to create negative numbers. However, it is still quite simple to use negative numbers in Squiid with the _ (underscore) key. The underscore key can be used in the two following scenarios:
Putting a negative number onto the stack
In order to put a negative number onto the stack, you can type the number followed by an underscore, which will subsequently place the negative number onto the stack. For example, typing 3_
would place -3
onto the stack, and typing #pi_
would place negative pi onto the stack.
Changing the sign of the last item on the stack
The underscore key can also be used to change the sign of the last item on the stack, or in other terms, multiply it by -1. For example, if you had the number 5
on the stack and you pressed _ with an empty input box, it would be changed to -5
, and vise versa.