GNOME Calculator "Advanced mode"
|Stable release||3.14.2 (November 13, 2014[±])|
|Preview release||3.15.1 (October 30, 2014[±])|
|Written in||C, Vala|
- Basic – Has a basic interface. It looks like a regular calculator.
- Advanced – More functions appear. This view add support for you to use custom variables.
- Financial – Adds financial calculation buttons
- Programming – Removes scientific buttons and adds bit calculation
The GNOME calculator uses the common infix notation for binary functions, such as the four basic arithmetic operations. Unlike many other calculators, it uses prefix notation, not postfix notation for unary functions. So to calculate e.g. the sine of one, you'd push the keys "sin", "1", "=" - not "1", "sin" as on many other calculators.
||This section contains instructions, advice, or how-to content. (November 2011)|
Advanced, Financial, and Programming modes present features for storing and retrieving values labeled as variables. R is the symbol for variable, used on GUI buttons ←R (insert variable) and →R (assign variable).
Variable names are case-sensitive alphabetical string without spaces. Variable values are numerical strings.
Values are assigned to variable names by entering in the GUI text input/result field a variable name followed by 0 or more spaces, followed by the = character, followed by 0 or more spaces, followed by either a numeric value or an existing variable name, e.g. "x = 2" or "result = subtotal" (if subtotal was already assigned a numeric value). A numeric value is assigned to the first variable name. If the value was entered as an existing variable name rather than as a numeric value, the existing variable's value is assigned to the first variable name. Assignment to a variable name that does not exist creates the new variable by name with the assigned value. The →R (assign variable) GUI button shows a popup menu of existing variables (and the current value of each), to which selected variable is assigned the current numeric value displayed in the calculator, just as if that variable name were entered in the GUI text field followed by a = followed by the numeric value.
Entering a variable name into the GUI text field substitutes the variable value for the variable name when the expression in the GUI text field is evaluated (e.g. when the keyboard <Enter> button or the = GUI button is pressed). The ←R (insert variable) GUI button shows a popup menu of existing variables (and the current value of each); the selected variable name is inserted (appended) into the GUI text field.
Two predefined variables are available from the ←R (insert variable) GUI button: ans and rand. ans contains the last "answer" value calculated by the calculator as a result. rand contains a random value between 0.0 and 1.0 (the value is not displayed; a rand variable is evaluated in an expression when calculating a result).
Variables, once created, cannot be destroyed/deleted using the GUI. Variable names and values persist between launch and quit of the application.
- "GNOME 3.14.2 is out". GNOME mailing list. November 13, 2014. Retrieved November 13, 2014.
- Clasen, Matthias (October 30, 2014). "GNOME 3.15.1". gnome-devel-announce mailing list. https://mail.gnome.org/archives/gnome-announce-list/2014-October/msg00042.html. Retrieved November 11, 2014.
- "gnome-calculator 3.12.3". 2013-06-15.
|Wikimedia Commons has media related to GCalctool.|