# &app; Manual v&manrevision;

2005-2007, 2016-2026 Hanna Knutsson
Hanna Knutsson
Hanna Knutsson
This manual describes version &appversion; of &app;.

Instructions for the command line calculator can be found in the qalc manual page.

This manual is also available as a single page.

Feedback

To report a bug or make a suggestion regarding the &app; application or this manual create a new issue at .

## Introduction

&app; is a powerful and highly flexible desktop calculator, but with a comparably simple and minimal user interface.

The center of attention in &app; is the expression entry. Just enter a mathematical expression as you would write it on paper, press Enter, et voilà!

The interpretation of mathematical expressions is flexible and fault tolerant. If you nevertheless enter an expression which is not entirely recognized or is considered ambiguous, &app; will provide an informative, but unobtrusive, error or warning. If an expression cannot be fully solved, &app; will simplify it as far as it can and answer with an expression.

In addition to numbers and arithmetic operators, expressions may contain any combination of variables, units, and functions. These are immediately accessible from the user interface — through automatic completion, or using the menu bar, the object managers, or the calculator keypad.

&app; also provides some specific tools for your convenience, such as a number base conversion dialog and a simple plotting interface.

Although use of &app; for simple calculations should be natural and self-explanatory, reading the rest of the manual can help you maximize your productivity and discover some maybe unexpected features. More advanced users should read on and discover a large number of customization options and the ability to create and modify your own variables, functions and units directly from the user interface.

## Differences in the new Qt user interface

This manual describes the classic GTK version of &app;. Most of it (particularly from chapter 4 and forward) also applies to the new Qt version. There are however some significant differences, particularly in the layout of the main window.

In the QT interface the current result is only shown in the history, which is always present below the expression entry. The current result is emphasized with a larger font size, compared to previous results. By default only the parsed expression, and not the entered expression, is displayed in the history.

How the currently edited expression is parsed is either displayed directly in the history or in a tooltip next to the text cursor, instead of below the expression entry. The current result of the expression (calculate-as-you-type) is also displayed in the same way (with a slight delay by default).

The keypad is hidden by default, but can be shown using the second button from the right (the last of the left aligned buttons).

Calculator mode options are changed in the menu opened using the top-left button (above the expression entry). Some settings have been moved to the preferences dialog.

Conversion (including unit conversion) are primarily applied to the current result or expression using the second button from the left.

The contents of the file menu and some of the edit menu in the GTK interface have been moved to the menu accessed using the top-right hamburger button.

## User Interface

### Main Window

Main Window

The main window provides a menu bar, the expression entry, the result display and a calculator keypad, history and conversion view (see ) which can be shown/hidden by clicking on Keypad, History and Conversion, respectively. When non-default options for the interpretation of expressions have been selected, the choice will be indicated in a small status area below the expression entry, to the right (click to change these choices).

### Expression Entry

The expression entry is the most important part of the &app; user interface. The normal calculation procedure in &app; is to type in a mathematical expression (e.g. 5 + 5) and press Enter (or click =). The result (10) is then displayed below the expression entry in the result display.

The icon in the upper right corner of the expression entry changes function depending on the current status. While editing the expression an equals sign is shown. When the icon is clicked the expression will be calculated. If this results in an error or a warning, the corresponding icon will be displayed instead, and if this is clicked, or if the pointer is placed over it, the error/warning text will be shown. If no error or warning is triggered, activation of the icon will instead clear the expression entry. No icon is shown when the expression is empty.

Completion

&app; helps out with the expression by giving a list of possible endings to words representing functions, variables and units. Titles, and countries for currencies, will also be searched, but any matches will be placed at the end of the list. The list will narrow with each letter typed. Select an item in the list and the name will be completed. If a function was selected, parenthesis will be added and the position moved for immediate entry of arguments. Completion can be configured from the context menu, or in more detail, from the preferences dialog.

As the expression is typed in, the area directly below the expression entry, to the left, will show useful information. By default the calculator's interpretation of the expression is shown (e.g. 5 × meter for 5m). The interpretation will be displayed in red (configurable) if there are errors in the expression or in blue for lesser errors (for example too many arguments in a function). If the last typed-in text represents a function and arguments are about to be entered, the function's name and its arguments will be displayed. The first argument in the information text is highlighted and includes information about its type and restrictions and when an argument has been entered, the next will be highlighted.

After execution of an expression, the whole expression will be marked. This normally means that if something new is entered, the old expression will be overwritten. If, however, an operator (+, −, ×, /, ^) is entered first, the old expression will instead be the target of action. The operator will then apply to the whole expression, which is put in parenthesis. This works on all marked ranges, meaning that this way an expression can conveniently be put in parenthesis. Functions set the selection as their first argument.

The Page Up and Page Down keys will access previously entered expressions. With focus in the expression entry, Page Up traverses backwards in the expression history and Page Down forward. The Up and Down can also be used for the same purpose when the completion list is not shown.

Although the expression entry can display multiple lines of text, the Enter key does not insert a line feed. New lines are automatically created when needed.

The expression entry also accepts commands, preceded be /. These commands are the same as in the command line program, qalc.

The font used for the expression entry can be selected in the preferences dialog (Edit Preferences).

Right-click in the expression entry to open a context menu, with general text editing options as well as selection of parsing modes (including number base), and menu items which open dialogs for insertion of vectors, matrices, or dates.

### Result Display

The result of calculations is displayed in the open area below the expression entry. The font used for the result display can be selected in the preferences dialog (Edit Preferences). Use of Unicode signs can be turned off in the same dialog. Otherwise &app; will try to make the result as fancy as possible and print π for pi, √ for sqrt, € for euro, and so on. Information about customization of the mathematical result output is available in .

In front of the result an equals or approximately equals sign is shown. This indicates whether &app; was able to calculate/display the result exact or only approximate, in the current mode.

The result display has a context menu, which pops up when clicking with the right button anywhere in the field. This menu provides a subset of the display alternatives from the mode menu () and some actions from the edit menu (). See more info in .

If you hold the pointer over the result area a tooltip will show the text representation of the result. To make it more obvious what the result means, abbreviations and implicit multiplication are not used here, and excessive parentheses are shown.

To copy the result, either select Edit Copy Result, press Ctrl Alt C, or copy the text from the history window.

### Keypad

The keypad provides access to a simple traditional number pad and as well as more advanced functionality.

Keypad

Click on the padlock icon to enable/disable persistent keypad, which makes it possible to display the keypad and the history simultaneously (the keypad view will be independent of the other views).

The top buttons (from left to right) switches between the general keypad and the programming keypad (affects the buttons on the left side, see ), switches between exact and approximate calculation, changes rational number form, selects display mode and selects number base in result (see ).

The buttons below are separated in two areas. The buttons on the right inserts basic numbers and operators, while most of the buttons to the left inserts or applies mathematical functions to the expression. All buttons on the left is paired with buttons, with downward arrows, that opens a menu with related functionality (generally more mathematical functions).

Most of buttons to the right will do something different depending on which button on the pointing device (mouse) that is clicked (for details see the table below; all actions are displayed as tooltips when holding the pointer over a button). Button press and hold on a button (for approximately half a second) will generally perform the same action as right-click. Right-click or long press on the buttons to the left will open the associated menu.

Selected/marked text in the expression entry is handled in different ways depending on the type of keypad button used. Numbers, variables and units will replace the selected text.

Operators will be placed after any selected text (except bitwise and logical NOT which is placed in front of the selection), which is put in parentheses. This, together with the fact that recently calculated expressions are automatically selected in the entry, means that if you click 5, 9, +, 2, =, × and 2 in order, the result expression is (59 + 2) × 2. In RPN mode the operators acts on the top two registers in the stack.

The mathematical functions accessed using keypad buttons (and menus) behave differently depending on the current edited expression. If the cursor is at the end of the expression and there is no operator or parenthesis immediately to left of the cursor (at the end of expression), the whole expression is used as function argument and the expression is immediately calculated using the function (if you type 5 + 2 and then click sin, sin(5 + 2) will be calculated). If text in the expression is selected, the selection will be used as the function argument. If the whole expression was selected the resulting expression will immediately be calculated. Functions that requires more than one argument do not follow these rules and in many cases opens a separate dialog for argument input. In RPN mode the function will always be applied to the register(s) at the top of stack, if the current expression is empty and there are enough registers for functions that require more one argument.

All actions and labels of the buttons on the right can be customized using Edit Customize Keypad Buttons (it is also possible to add additional columns of buttons). The default buttons, and associated actions, are listed below.

Right Keypad

Button | Left-click (button 1) | Right-click (button 3) or long press | Middle-click (button 2)
--- | --- | --- | ---
= | Calculates the current expression | MR (memory recall) | MS (memory store)
ANS | Variable for last calculated value (dynamic) | `answer()` function (fixed) | -
DEL | Delete | Backspace | M− (memory minus)
AC | Clears the expression | MC (memory clear) | -
+ | Addition operator | M+ (memory plus) | Bitwise AND operator (&)
− | Subtraction operator | Negate | Bitwise OR operator (|)
× | Multiplication operator. | Bitwise exclusive OR operator (XOR) | -
/ | Division operator. | Reciprocal (inv() function) | -
xy | Exponentiation operator (^) | Square root function (√) | -
0 | 0 | ⁰ (^0) | ° (degree)
1 | 1 | ¹ (^1) | Reciprocal (`inv()` function)
2 | 2 | ² (^2) | ½ (1/2)
3 | 3 | ³ (^3) | ⅓ (1/3)
4 | 4 | ⁴ (^4) | ¼ (1/4)
5 | 5 | ⁵ (^5) | ⅕ (1/5)
6 | 6 | ⁶ (^6) | ⅙ (1/6)
7 | 7 | ⁷ (^7) | ⅐ (1/7)
8 | 8 | ⁸ (^8) | ⅛ (1/8)
9 | 9 | ⁹ (^9) | ⅑ (1/9)
. or , | Decimal point | Blank space | New line
EXP | E or e (shorthand for 10x) | Exponential function | `exp10()` function
) | Right parenthesis. | Right bracket (]) for vectors and matrices | -
( | Left parenthesis. | Left bracket ([) for vectors and matrices | -
(x) | Smart parentheses | [] around selection | -
, or ; | Argument/vector separator | Blank space | New line
± | Interval/uncertainty operator | Uncertainty function (relative error) | Interval function
% | Percent (or modulus operator) | Per mille | -
Left and right arrows | Move cursor one character | Move cursor to beginning or end | -
Up and down arrows | Cycle through expression history | - | -

DEL deletes one character to the right or, if the cursor is at the end of the expression, to the left of the cursor (right-click always deletes the character to the left of the cursor). Long press on the button will continuously delete.

EXP inserts the shorthand notation (E or e) for ten raised to the power of x. This only applies to digits (2E6 equals 2 × 10^6, xEy ≠ x × 10^y). If whole or part of the current expression is selected, ×10^ will instead be inserted after the wrapped selection. If current input base is not 10, than the selected number base will be used as base (e.g. ×16^ for hexadecimal input).

ANS inserts the first answer variable. This variable always contains the last calculated result. This will be updated after each calculation (unlike when using the answer() function with a positive argument).

The (x) button (Ctrl() places opening and closing parentheses around the selected text in the expression entry. If no text is selected either the expression to the right of the cursor (if the cursor is at the beginning of the expression or if there is an operator or left parenthesis to the left of the cursor) or to the left of the cursor is put inside parentheses. If the expression is empty, as well as in some other cases (to avoid broken expression), empty parentheses are inserted.

The arrow buttons works a bit differently than the other. The direction of the action will depend on which half of the button that is pressed (the right side of the button, with the arrow pointing to the right, will move the insert cursor when step forward). Long press on the button will continuously move the cursor (or continuously cycle through the expression history).

The characters used as decimal point and argument separator varies between different locales. The argument separator is used for separation of arguments to functions that takes more than one argument.

Below follows a list of the buttons on the left side (including their menus and associated actions), from left the right, top to bottom.

Left Keypad

Button | Action | Menu
--- | --- | ---
STO | Stores the current result in a variable. See | A list of created variables. Left click to insert the variable. Right click for the option to edit or delete the variable, or store the current result in the variable.
f(x) | Creates a new function. See . | Created and recently used (accessed from this menu, the menubar or the function manager) functions. The last item opens the function manager.
0xff | Opens the convert number bases dialog. | Bitwise operators
a(x)b | Factorizes the result (or the current expression). | Expansion of polynomials and expansion of partial fractions, integration and differentiation
x! | Factorial (e.g. 5!=factorial(5)=5×4×3×2×1=120) | Other factorial functions and functions related to combinatorics
ln | Natural logarithm function | Other logarithmic functions
√ | Square root function | Other root functions
e | The base of natural logarithms | Exponential and complex exponential functions
mod | Modulus operator/function | `rem()`, `abs()`, `gcd()` and `lcm()` functions
x̄ | Statistical mean function | A selection of statistical functions, and `rand()` for random number generation
Σ | Summation function | Π, `for()` and `if()` functions
π | Archimedes' constant (pi) | Pythagoras, Euler's and golden ratio constants, and recently used variables/constants (accessed from this menu, the menubar or the variable manager) and/or a selection of physical constants. The last item opens the variable manager.
sin | Sine function | `sinh()`, `asin()` and `asinh()` functions, and angle unit selection
cos | Cosine function | `cosh()`, `acos()` and `acosh()` functions, and angle unit selection
tan | Tangent function | `tanh()`, `atan()` and `atanh()` functions, and angle unit selection
i | Imaginary unit (i2 = −1) i | Complex number functions
z | Unknown variable z | Assumptions for the z variable
y | Unknown variable y | Assumptions for the y variable
x | Unknown variable x | Assumptions for the x variable
x = | Equals operator (primarily used in equations) | Equation solving related functions, and replacement of unknowns in the current result
u | Opens the unit manager | Recently used units and/or a selection of common units, and a selection of prefixes
kg | Most recently used unit from the associated menu, or kilogram | All SI base units and SI derived units with special names and symbols, plus litre
€ (or local currency) | Most recently used unit from the associated menu, or euro/local currency | All current currency units (excludes currencies replaced by euro)
x ➞ | Convert to operator (selection is unselected). The expression before right arrow or to (or the previous result if the expressions begins with to) is converted to the unit expression after to. See . | Convert to base units, optimal unit, or optimal prefix. Below is a list of appropriate units (with common units appended) to convert the current result to. If the result does not include any units options to convert the result to different number bases, fraction and factors appear. The current expression (if modified) is calculated when the menu is opened.

Programming keypad

The buttons on the left side can be replaced (using the top left button or Ctrl P) by a set of buttons for quick access to functions particularly useful for programmers. In place of the menus over the keypad, the current result will be shown in binary, octal, decimal and hexadecimal number bases. The buttons are listed below, from left to right, top to bottom.

Programming Keypad

Button | Left-click | Right-click or long press
--- | --- | ---
BIN | Switches to binary number base for expressions and result display. | Toggles binary number base for result display on/off.
OCT | Switches to octal number base for expressions and result display. | Toggles octal number base for result display on/off.
DEC | Switches to decimal number base for expressions and result display. | Toggles decimal number base for result display on/off.
HEX | Switches to hexadecimal number base for expressions and result display. | Toggles hexadecimal number base for result display on/off.
2→ | Toggles two's complement representation on/off for input of negative numbers. | -
→2 | Toggles two's complement representation on/off for display of negative numbers. | -
A | Hexadecimal digit | -
B | Hexadecimal digit | -
C | Hexadecimal digit | -
D | Hexadecimal digit | -
E | Hexadecimal digit | -
F | Hexadecimal digit | -
AND | Bitwise AND operator (&) | Logical AND operator (&&)
OR | Bitwise OR operator (|) | Logical OR operator (||)
XOR | Bitwise exclusive OR operator (xor) | -
NOT | Bitwise NOT operator (~) | Logical NOT operator (!)
<< | Bitwise left shift operator | -
>> | Bitwise right shift operator | -
cmp | Bitwise complement (NOT) function (specify bit width and signedness) | -
rot | Bitwise rotation function | -
mod | Modulus operator | Remainder operator
div | Integer division operator | -
int | Integer part function (int(-5.2) = -5) | -
frac | Fractional part function (frac(-5.2) = -0.2) | -
x-1 | Reciprocal (1/x) function | -
|x| | Absolute value function (abs(-5) = 5) | -
√ | Square root function | Cube root function
ln | Natural logarithm function | -
log2 | Base-2 logarithm function | Base-10 logarithm function
exp | Exponential function (ex) | Base-2 exponential function (2x)
x! | Factorial (e.g. 5!=factorial(5)=5×4×3×2×1=120) | -
a×b | (Integer) factorizes the result (or the current expression). | -
fp | Opens a window for conversion between decimal values and floating point formats. | -
a→1 | `code()` function (returns numeric code of Unicode character) | `char()` function (for conversion of numeric code to Unicode character)
u→d | Function for conversion of Unix timestamp to date and time | Function for conversion of date and time to Unix timestamp
STO | Stores the current result in a variable. See | Opens a menu with a list of created variables. Left click to insert the variable. Right click for the option to edit or delete the variable, or store the current result in the variable.

### Calculation History

The history view provides access to previous calculation results (50 rows are reloaded on restart). Previous expressions and results, as well as errors and warnings, are listed. The text of one or multiple entries can be copied to the clipboard using the Copy button to the right of the list.

Calculation History

Double click an item in the history list or use the Value or the Text button to paste the selected value or expression into the expression entry. The Value button inserts the actual value, using the answer() and expression() functions (for results and parsed expressions, respectively) with the current history index (indicated in the left column of the list), as argument, instead of the text (which might be inexact and is not guaranteed to be parsed correctly). This is not possible for the history entries of previous sessions. When an item is double clicked the actual value is used for results, but the text for expressions, allowing editing of the expression.

To the right of the list are also buttons for mathematical operations. These act on the selected history items (the + will calculate the sum of the selected values, while the − will calculated the difference between the first, uppermost, selected value and the rest, in order). If no value is marked the sign for the operator will be inserted into the expression entry (as the buttons on the keypad). If only one item is selected the buttons also use the current expression (the + button will append + [value] to the current expression). The square root button will however only act on single values. When persistent keypad is active, the corresponding buttons on the right side of the keypad provide the same functionality.

Additional actions are available in the context menu of the history list. This includes options to copy the full text of one or multiple entries, search the history, delete or move entries, to clear the whole list, and to bookmark and/or protect entries from deletion when the list becomes too long or is cleared.

### Minimal Window

It is possible to minimize the footprint of the calculator window using File Minimal Window or Ctrl Space. This will hide everything but the expression entry and the equals button. The window is expanded to reveal to result, but the result display stays hidden while empty. Restore the window using the keyboard shortcut or the icon in lower right corner of the expression entry.

Minimal Window

### Menu Bar

The menus in the menu bar provides access to most of the functionality of &app;. Their contents are listed and described below.

File Menu

Menu Item | Description
--- | ---
New | Submenu for creation of new objects. See .
Import CSV File... | Opens a dialog for import of a data file as a matrix or vectors.
Export CSV File... | Opens a dialog for export of a matrix or vector to a data file.
Store Result... (Ctrl S) | Stores the current result as a variable. See .
Save Result Image... | Saves the result display to a PNG image.
Save Definitions | Saves all user definitions (variables, functions and units).
Update Exchange Rates | Downloads current exchange rates from the Internet.
Plot Functions/Data | Opens the plot dialog. See .
Convert Number Bases (Ctrl B) | Opens the number bases converter. See .
Floating Point Conversion (IEEE 754) | Opens a window for conversion between decimal values and floating point formats.
Calendar Conversion | Opens a window for conversion of dates between different calendars.
Percentage Calculation Tool | Opens a window for quick and easy percentage calculation.
Periodic Table | Shows a periodic table, with property values which can be inserted in the expression, in a new window.
Minimal Window (Ctrl Space) | Hides everything but the expression entry, the result (when not empty), and the equals button.
Quit (Ctrl Q) | Exits &app;

New Menu

Menu Item | Description
--- | ---
Variable | Opens the variable edit dialog for creation of a new variable.
Matrix | Opens a dialog for entry of a new matrix variable.
Vector | Opens a dialog for entry of a new vector variable.
Unknown Variable | Opens the variable edit dialog for creation of a new unknown variable.
Function | Opens the function edit dialog for creation of a new function.
Data Set | Opens the data set edit dialog for creation of a new data set.
Unit | Opens the unit edit dialog for creation of a new unit.

Edit Menu

Menu Item | Description
--- | ---
Variables (Ctrl M) | Opens the variable manager. See .
Functions (Ctrl F) | Opens the function manager. See .
Units (Ctrl U) | Opens the unit manager. See .
Data Sets | Opens the data set manager.
Factorize | Factorizes the current result. For multivariate rational polynomials, only square free factorization is fully supported.
Expand | Expands the current result.
Expand Partial Fractions | Applies partial fraction decomposition to the current result.
Set Unknowns... | Opens a dialog where the values of unknown variables in the result can be set and the result recalculated.
Convert To Unit | Submenu with units. Select a unit to convert the current result.
Set Prefix | Submenu for choice of unit prefix in current result.
Convert To Unit Expression (Ctrl T) | Opens the convert to unit view for conversion of result to custom unit expression. See .
Convert To Base Units | Splits up unit(s) in the current result into base units.
Convert To Optimal Unit | Tries to convert the units in the current result to as few units and exponents as possible. Only SI units are used for the conversion, but if no improvement is achieved, the original units are kept. Currencies are converted to the local currency, unless deactivated in the preferences dialog.
Convert To Optimal SI Unit | Tries to convert the units in the current result to as few units and exponents as possible. Non-SI units are not kept, even if the number of units increases, and the automatic alternative is prioritized. Currencies are converted to the local currency, unless deactivated in the preferences dialog.
Insert Date | Opens a dialog for date selection (for insertion in the current expression).
Insert Matrix | Opens a dialog where you can create a matrix in a spreadsheet-like table and insert into the expression entry. If selected expression text is a matrix, then the matrix is edited.
Insert Vector | Opens a dialog where you can create a vector in a spreadsheet-like table and insert into the expression entry. If selected expression text is a vector, then the vector is edited.
Copy Result (Ctrl Alt C) | Copies the current result to the clipboard.
Copy Result as Unformatted ASCII | Copies the current result with formatting removed and Unicode symbols replaced with corresponding ASCII characters.
Keyboard Shortcuts | Opens a dialog for editing key bindings.
Customize Keypad Buttons | Opens a dialog for customizing the labels and actions for the keypad buttons on the right side, and optionally adding additional columns of buttons.
Preferences | Opens the preferences dialog, which controls settings for visual appearance and start/exit actions.
Open Settings Folders | Opens the folder(s) containing the configuration files in the default file manager.

Mode Menu

Menu Item | Description
--- | ---
Number Base | Submenu with a list of number bases (binary, octal, decimal, duodecimal, hexadecimal, sexagesimal, time format, and other bases, and roman numerals) to select for result display, and a menu item (Ctrl B) for opening a dialog to switch number bases in expression (input) and result (output).
Numerical Display | Submenu which selects numerical display mode. See .
Rational Number Form | Submenu which switches between display of rational numbers as fractions or decimal numbers. See .
Interval Display | Submenu with options that determines how intervals and results with associated uncertainty are shown. The adaptive option is the same as significant digits display unless an interval has been explicitly specified in the expression.
Unit Display | Submenu which controls the display of units and prefixes. See .
Abbreviate Names | Toggles on/off use of abbreviation for unit, prefix, variable and function names in result display.
Enabled Objects | Submenu which enables/disables variables, functions, units and unknowns (will not affect defined unknown variables and quoted unknowns), calculation of variables (if calculation of variables is not on, all variables will be treated as unknown), and units in variables for physical constants. Here you can also disable complex and infinite results.
Approximation | Submenu which switches between different approximation modes.
Interval Calculation | Submenu for selection of algorithm for interval calculation / uncertainty propagation.
Angle Unit | Submenu which sets the default angle unit for trigonometric functions.
Assumptions | Submenu which changes default assumptions for unknown variables.
Algebraic Mode | Submenu with options to automatically expand or factorize the final result. In this menu, the option toggle on/off use of the assumption that unknown denominators not are zero is also found. This alternative makes it possible to avoid the situation where expressions such as (x-1)/(x-1) can not be further simplified because the denominator might be zero (if x equals 1).
Parsing Mode | Submenu with options to control how expressions are parsed (read/interpreted). There are three main modes to choose from. In addition the read precision option enables/disables interpretation of input numbers with decimals as approximations with a precision equal to the number of digits (after preceding zeroes), and limit implicit multiplication limits the use of implicit multiplication for parsing and display of expressions. For more information see . Additionally RPN and chain syntax modes can be selected.
Precision | Opens a dialog to change precision in calculations.
Decimals | Opens a dialog to change displayed number of decimals.
Calculate As You Type | When activated the current expression will be continuously calculated on each single change.
Chain Mode | (De)activates chain mode. In chain mode the expression are, when operators are entered, transformed to mimic the behavior of traditional simple calculators in immediate execution mode. The result is equivalent to that of the chain syntax (see ). The result is updated each time an operator is entered.
RPN Mode (Ctrl R) | (De)activates the Reverse Polish Notation stack (not RPN syntax). For details see
Meta Modes | Provides a list of available meta modes for loading and menu items to save and delete modes.
Save Default Mode | Saves the current calculator mode as the startup default.

Functions Menu

Menu Item | Description
--- | ---
(Recent functions list) | Select a function to open the insert function dialog.
(Function list) | Select a function to open the insert function dialog.

Variables Menu

Menu Item | Description
--- | ---
(Recent variables list) | Select a variable to insert it into the expression entry.
(Variable list) | Select a variable to insert it into the expression entry.

Units Menu

Menu Item | Description
--- | ---
(Recent units list) | Select a unit to insert it into the expression entry.
(Unit list) | Select a unit to insert it into the expression entry.

Help Menu

Menu Item | Description
--- | ---
Contents (F1) | Opens this help.
Report a Bug | Opens the web interface for creation of bug reports.
Check for Updates | Checks if a new version of &app; is available.
About | Info about &app;

### Variable/Function/Unit Managers

The variables, functions, and units windows provide a structural way of working with variables, functions and units (collectively referred to as objects). The windows for the three different objects are essentially similar. They can be opened from the edit menu, or using Ctrl M, Ctrl F and Ctrl U for variables, functions and units respectively.

Variable Manager

To the left is a category tree and beside that is a list of all objects in the selected category, including all subcategories. Objects without a category are put under Uncategorized. Objects created by the user can also be found under the category User variables, User functions, and User units, shown at the top of the list. Deactivated objects are only found in the Inactive top category. Below the categories and objects lists, a description of the selected object is shown.

The buttons on the right work on the selected object in the list. New opens a dialog for creation of a new object, while Edit opens the same dialog to edit the selected unit. Delete removes the object and (De)activate toggles recognition in expressions on/off. Insert in the variables and units windows adds the object to the current expression, while Calculate in the functions window opens a dialog for entering arguments and provides options for insertion of the function or direct calculation. The unit manager provide an additional button for conversion of the current result, the variable manager a button for export to a data file, and the function manager a button for applying functions with a single argument directly to the current expression.

Function Manager

The function manager has a description box at the bottom, which shows the syntax, description and arguments of the selected function.

Unit Manager

The unit manager has an area for quick conversion between units. This converts between the selected unit in the list and the selected unit in the menu. Both the menu and the list filters the units as you type. Units are converted by specification of a quantity, in the entry next to the unit to convert from, followed by Enter.

For more information about variables, functions and units, see , and .

### Convert Number Bases Dialog

The number bases dialog, accessible from the File Menu, is an efficient and convenient tool for conversion between binary, octal, decimal, duodecimal, hexadecimal and Roman numbers. This dialog contains entries for each number base. When a number is typed in any of the entries, the others are automatically updated to display the current number in their format. Numbers, or expressions, entered follow the same rules as expressions in the main expression entry.

Convert Number Bases Dialog

## Expressions

Expressions are mathematical statements. Mathematical questions are asked through expressions, which contains objects tied together with operators. The result of an expression may also be an expression, if the result is not a single object. Apples and oranges can be mixed, but the result will hold them apart. &app; knows algebra.

### Objects

In &app; mathematical entities, such as numbers and variables, are referred to as objects. The recognized object types are listed below.

Numbers

  These are the regular numbers composed by digits 0-9 and a decimal sign — a dot, or a comma if it is the default decimal point in the locale/language used. If comma is used as decimal sign, the dot is still kept as an alternative decimal sign, if not explicitly turned off in the preferences dialog with Ignore dots in number (to allow it to be used as thousand separator instead). Numbers include integers, real numbers, and complex numbers. The imaginary part of complex numbers is written as a regular number followed by the special variable i (can be changed to a j, placed in front of the imaginary part, in the preferences dialog), which represents the square root of -1 (e.g. 2 + 3i). Spaces between digits are ignored (5 5 = 55). E (or e) can be considered as a shortcut for writing many zeroes and is equivalent to multiplication by 10 raised to the power of the right-hand value (e.g. 5E3 = 5000).

  Sexagesimal numbers (and time) can be entered directly using colons (e.g. 5:30 = 5.5). A number immediately preceded by 0b, 0o, 0d or 0x is interpreted as a number with base 2, 8, 12 or 16, respectively (if the default base is 10, e.g. 0x3f = 63). The number base can also be selected, either by using the `base()`, `bin()`, `oct()`, `hex()` and `roman()` functions, or by setting the base used for all numbers in the whole expression from Mode Number Base Select Result and Expression Base.... For details about supported number bases see .

Intervals

  A number interval can be entered using the `interval()` function (specifies the upper and lower limit of the interval), the `uncertainty()` function (specifies relative or absolute uncertainty), or using ± or +/-, specifying the width of the interval after the mid value (e.g. 5±1 = uncertainty(5, 1, 0) = 5±20% = uncertainty(5, 0.2) = interval(4, 6). If activated, concise notation can also be used, e.g. 1.2345(67) = 1.2345±0.0067. If the read precision option is activated, decimal numbers are interpreted as an interval between the numbers that are normally rounded to the entered number (e.g. 1.1 = 1.1±0.05). If interval calculation using variance formula is activated (default), the interval represents the standard uncertainty (deviation) of the value.

Vectors and Matrices

  A matrix is a two-dimensional rectangular array of mathematical objects. Vectors are matrices with only one row or column, and thus one-dimensional sequences of objects. Vectors and matrices are generated by `vector()`, `matrix()` and similar functions, or using a syntax in the form of [1 2 3 4] and [1 2; 3 4], with columns separated by space or comma and rows separated by semi-colon, or (1, 2, 3, 4) and ((1, 2), (3, 4)). Vectors with a sequence of numbers can be input using ... (e.g. 1...4), or colon (e.g. [1:4], or [1:1:4] where the second value specifies the increment). Vectors are generally considered as matrices with one row (row vector) in operations that expect a matrix (e.g. matrix multiplication).

  Matrices and vectors with many elements are easier to handle if stored in variables. A single element of a vector variable can be selected using the `element()` function, or by placing the index (first index is 1) in parenthesis, e.g. v(2) or v[2] (the latter syntax can also be used for vector returning functions).

Variables/Constants

  See .

Functions

  See .

Units and Prefixes

  &app; understands abbreviated, plural and singular forms of unit names and prefixes. Prefixes must be put immediately before the unit to be interpreted as prefixes — 5 mm = 0.005 m, but 5 m m = 5 m^2. Also, for convenience units allow the power operator to be left out. A number following immediately after a unit is interpreted as an exponent (e.g. 5 m2 = 5 m^2). This does not apply to currencies, as they might be put in front of the quantity. More information in .

Unknowns

  Unknowns are text strings without any associated value. These are temporary unknown variables with default assumptions. Unknowns can also be explicitly entered by placing a backslash (\) before a single character (e.g. 5\a + 2\b) or using quotation marks (" or ') before and after a text string (e.g. 5 "apples" + 2 "bananas"). If unknowns are activated (Mode Enabled Objects Unknowns) and &app; finds a character that are not associated with any variable, function or unit in an expression, then it will be regarded as an unknown variable. See .

Date and Time

  Date/time values are specified using quoted text string (quotation marks are not needed for function arguments), using standard date and time format (YYYY-MM-DDTHH:MM:SS). Some local formats are also supported, but not recommended. The local time zone is used, unless a time zone is specified at the end of the time string (Z/UTC/GMT or +/-HH:MM). Date/time supports a small subset of arithmetic operations. The time units represents calendar time, instead of average values, when added or subtracted to a date.

Text

  This category represent a number of different function argument types, such as regular text and file names. They can, but do not need to be put in quotes except when containing the argument separator (, or ;).

Comments

  All text after a hashtag (e.g. (5×2)/2 #calculating triangle area) is treated as a comment, which are added to the history. Use double hashtags (##) at the beginning of the expression to add a comment as a separate history item at the top.

To avoid confusion, functions, units, variables and unknown variables can independently be disabled.

Variables, functions and units are all accessible in the menus and in the variable, function and unit managers, If their names are not remembered. Functions accessed this way have some extra conveniences. If the function has at least one argument, a dialog will pop up where arguments can be entered and a description of the function and its arguments is available.

&app; can handle most commonly used symbols for certain variables, functions and units, even though most are difficult to find on a keyboard. These include π for pi, √ for sqrt, € for euro, and so on. Most importantly it is possible to copy these symbols when used in the result.

For more information about variables, functions and units, see , and .

### Operators

The following operators are defined in &app; and may be used in expressions. Word operators (such as AND) must be surrounded by space (e.g. 5 mod 2, not 5mod2.

Operators

Operation | Symbol | Description | Example | Result
--- | --- | --- | --- | ---
Addition | +, plus | Adds the right value to the left value. | 1 + 1 | 2
Subtraction | −, minus | Subtracts the right value from the left value. | 1 − 1 | 0
Multiplication | ×, ⋅, *, times | Multiplies the left value by the right value. | 2 × 2 | 4
Division | /, per | Divides the left value by the right value. | 2 / 2 | 1
Remainder | %, rem | Returns the remainder after (truncated) division. The result will have the same sign as the dividend. | 3%2 | 1
Modulo | %%, mod | Returns the remainder after (floored) division. The result will have the same sign as the divisor. | 3 mod -2 | -1
Integer Division | //, \, div | Divides the left value by the right value and rounds the result towards zero. | 5 // 2 | 2
Exponentiation | ^, ** | Raises the left value by the right value. Can also be typed as **. Note that x^y^z equals x^(y^z), and not (x^y)^z. Note also that for non-integer exponents with negative bases, the principal root is returned and not the real root ((-8)^(1/3) equals 1 + 1.73i instead of -2). To calculate the real root for negative values, use the `cbrt()` and `root()` functions. | 2^3 | 8
10^x | E | Multiplies the left value with 10 raised to the power of the right value. Equivalent to the exponential number format in result display. E is as much an operator as part of numbers. | 1E3 | 1000
Factorial | ! | Returns the factorial of the value to the left of the operator. If the operator is repeated the corresponding multifactorial is returned. | 5! | 120
Parenthesis | ( and ) | Evaluates the expression in parenthesis first. | 5 × (1 + 1) | 10
Parallel sum | ∥, || | Returns the reciprocal value of a sum of reciprocal values. || is interpreted as parallel if units are used, otherwise as logical OR. | 10 Ω || 6 Ω | 3.75 Ω
Equals | = | Returns true if the left value equals the right value. Unknown variables (e.g. x) are isolated if the expression does not evaluate as true or false. | 1 = 2, 5x = 5 | 1, x=1
Not equals | ≠, != | Returns true if the left value does not equals the right value. Unknown variables (e.g. x) are isolated if the expression does not evaluate as true or false. | 1 != 2, x + 2 != 5 | 1, x != 3
Less than | < | Returns true if the left value is less than the right value. Unknown variables (e.g. x) are isolated if the expression does not evaluate as true or false. | 1 < 2 | 1
Greater than | > | Returns true, if the left value is greater than the right value. Unknown variables (e.g. x) are isolated if the expression does not evaluate as true or false. | 1 >2 | 0
Less than or equal | ≤, <= | Returns true if the left value is less than or equal the right value. Unknown variables (e.g. x) are isolated if the expression does not evaluate as true or false. | 1 <= 2 | 1
Greater than or equal | ≥, >= | Returns true if the left value is greater than or equal the right value. Unknown variables (e.g. x) are isolated if the expression does not evaluate as true or false. | 1 ≥ 2, x + 5 ≥ 7 | 0, x ≥ 2
Logical NOT | !, not | Returns true if the value to the right is false. | !(1>2) | 1
Logical OR | ||, or | Returns true if the right or left value is true. | 1>2 || 2>1 | true
Logical XOR | ⊕, xor | Returns for true if one, but not both, of the right or left value is true. | 1>2 ⊕ 2>1 | true
Logical NOR | nor | Returns true if both the right and left value is false. | 1>2 nor 2>1 | false
Logical AND | &&, and | Returns true if both the right and left value is true. | 1>2 && 2>1 | false
Logical NAND | nand | Returns true if the right or left value is false. | 1>2 nand 2>1 | true
Bitwise NOT | ¬, ~ | Equivalent to -1 − x. | ~(0010 | 1100) | -1111
Bitwise Shift Left | << | Shifts the bits of the left value x steps to the left, where x is the value on the right. Implemented as a shortcut for `shift()` | 0011 << 1 | 0110
Bitwise Shift Right | >> | Shifts the bits of the left value x steps to the right, where x is the value on the right. Implemented as a shortcut for `shift()` | 0011 << 1 | 0001
Bitwise OR | ∨, | | If a bit is 1 in one of the numbers set it to 1, otherwise 0. Also functions as elementwise logical operator on vectors. | 0010 | 1100 | 1110
Bitwise XOR | ⊻, ^^, xor | If a bit is 1 in one of the numbers and not in the other, set it to 1, otherwise 0. Can normally also be used as logical XOR. ⊻ can be input using Ctrl^ (or just ^ if selected in preferences) on the keyboard. | 1010 ⊻ 1100 | 0110
Bitwise AND | ∧, & | If a bit is 1 in both numbers set it to 1, otherwise 0. Also functions as elementwise logical operator on vectors. | 1010 & 0011 | 0010
Dot Product | ., dot | Returns the dot product for two vectors. | [1, 2, 3].[4, 5, 6] | 32
Cross Product | ⨯, cross | Returns the cross product for two vectors. | [1, 2, 3] cross [4, 5, 6] | [-1, 6, -3]
Elementwise Multiplication | .×, .* | Multiplies each element of a vector/matrix with the corresponding element in another vector/matrix, or a scalar. | [1, 2, 3].*[4, 5, 6] | [4, 10, 18]
Elementwise Division | ./ | Divides each element of a vector/matrix by the corresponding element in another vector/matrix, or a scalar. | [2, 4, 6]./2 | [1, 2, 3]
Elementwise Exponentiation | .^ | Raises each element of a vector/matrix by the corresponding element in another vector/matrix, or a scalar. | [1, 2, 3].^2 | [1, 4, 9]
Transpose | .' | Returns the transpose of the matrix to the left of the operator. | [1 2 3; 3 4 5].' | [1 3; 2 4; 3 5]
Set Operators | ∪, ∩, ∖, ⊖, ∈, ∉, ∋, ∌, ⊊, ⊆, ⊋, ⊇ | Applies set operation to vectors to the left and right of the operator. | [1, 2, 3]∩[2, 3, 4] | [2, 3]
Combination | comb | Same as `comb()` function. | 5 comb 2 | 10
Permutations | perm | Same as `perm()` function. | 5 perm 2 | 20
Save as Variable/Function | :=, = | Saves the value or expression to the right of the operator as a variable or function (as `save()` function). If colon is omitted, the expression is calculated before it is assigned to the variable. | var1:=5 func1():=x+y var1=ln(5)+2 |

The multiplication sign can generally be left out. This is not true for numbers (5(5) = 25 but 5 5 = 55). Expressions can also generally be written with or without spaces with the same result (2xsin(2) equals 2 x sin(2) which equals 2 × x × sin(2)), but be careful. The vast number of functions and units means that without separating spaces, the result might not be obvious. To avoid confusion &app; can limit the use of implicit multiplication (Mode Limit Implicit Multiplication), so that space, operator or parenthesis must be put between functions, units and variables (in this mode esqrt(5) does not equal e × sqrt(5)). Also note that unit prefixes must be put immediately before the unit, to be interpreted as prefixes (5 mm = 0.005 m, but 5 m m = 5m^2). You can see how the expression was interpreted in the history window.

Usually, mathematical expressions are written as normally expected. Standard operator precedence apply. Expressions are evaluated according to the following priorities:

1. Parenthesis

2. E (10^x)

3. Exponentiation (^, .^)

4. Functions (e.g. sqrt(2))

5. Bitwise NOT (~)

6. Logical NOT (!)

7. Multiplication, division, integer division, remainder, modulo (*, /, //, %, %%, .*, ./, ., ⨯)

8. Parallel sum (∥)

9. Addition and subtraction (+, −)

10. Bitwise NOT (~)

11. Bitwise Shift (<<, >>)

12. Comparison (>, <, =, >=, <=)

13. Bitwise AND (&)

14. Bitwise XOR (⊻)

15. Bitwise OR (|)

16. Logical AND (&&)

17. Logical NAND

18. Logical NOR

19. Logical OR (||)

20. Logical XOR (⊕)

### Implicit Multiplication and Parsing Modes

The evaluation of short/implicit multiplication, without any multiplication sign (e.g. 5x, 5(2+3)), differs depending on the parsing mode. In the conventional mode implicit multiplication does not differ from explicit multiplication (12/2(1+2) = 12/2×3 = 18, 5x/5y = 5 × x/5 × y = xy). In the parse implicit multiplication first mode, implicit multiplication is parsed before explicit multiplication (12/2(1+2) = 12/(2 × 3) = 2, 5x/5y = (5 × x)/(5 × y) = x/y). The default adaptive mode works as the parse implicit multiplication first mode, unless spaces are found (1/5x = 1/(5 × x), but 1/5 x = (1/5) × x). In the adaptive mode unit expressions are parsed separately (5 m/5 m/s = (5 × m)/(5 × (m/s)) = 1 s). Function arguments without parentheses are an exception, where implicit multiplication in front of variables and units is parsed first regardless of mode (sqrt 2x = sqrt(2x)).

If the limit implicit multiplication option is activated, the use of implicit multiplication when parsing expressions and displaying results will be limited to avoid confusion. For example, if this mode is not activated and integrte(5x) is accidently typed instead of integrate(5x), the expression is interpreted as int(e × e × (5 × x) × gr × t) (displayed in history window). The result will then without any error be int(2.3940139x × km^2) instead of 2.5x^2. If limit implicit multiplication is activated, the mistyped expression would instead show an error telling that integrte is not a valid variable, function or unit (unless unknowns is enabled in which case the result will be 5 "integrate" × x). When implicit multiplication is limited, variables, functions and units must be separated by a space, operator or parenthesis (xy does not equal x × y).

In addition there are two special parsing modes — RPN syntax (for details see ) and chain syntax. The chain syntax interprets expressions in a manner similar to the immediate execution mode of a traditional calculator. Instead of using the standard order of operations, the expression is simply calculated from left to right (e.g. 1 + 2 × 3 = (1 + 2) × 3 = 9 instead of 1 + 2 × 3 = 1 + (2 × 3) = 7). Functions, with a single argument, apply to the value immediate to the left of the function name (e.g. 1 + 2 sin = 1 + sin(2)), unless parentheses are used.

### The to (and where) operators

Putting to (or a right arrow, e.g. -> but not >) followed by an expression at the end of the mathematical expression is mainly used for unit conversion (see ). There are however also some convenient commands that can be typed after to . Here is a list of possible to values:

A unit or unit expression

  Convert to a unit or a unit expression (e.g. 5 ft + 2 in to meter = 1.5748 m or 50 mph to km/h ≈ 80 km/h). Prepend with a question mark (?) to request the optimal prefix. Modifiers in front of the question mark selects the type of prefixes used — 'b' for binary prefixes, 'd' for decimal prefixes, and 'a' for all decimal prefixes including centi, deci, etc. (e.g. 8 × 1024 bits to b?bytes = 1 kibibyte). Prepend with + or - to force/disable use of mixed units (e.g. 5 m to + ft ≈ 5 yd + 1 ft + 4.9 in).

A physical constant or a variable

  Convert to variable as unit (e.g. 500 km/ms to c ≈ 1.7 c).

base

  Convert to base units (e.g. 1 lux to base = 1 cd/m2).

optimal

  Convert to optimal unit (e.g. (10 J)/(2 s) to optimal = 5 W).

prefix

  Convert to optimal prefix (e.g. €5000 to prefix = k€5).

mixed

  Convert to mixed units (e.g. 90 s to mixed = 1 min + 30 s.

bin, binary

  Show as binary number (e.g. sqrt(900) to bin = 0001 1110). Append an integer to specify the number of bits (e.g. 4 to bin16 = 0000 0000 0000 0100).

oct, octal

  Show as octal number (e.g. 52 to octal = 64).

duo, duodecimal

  Show as duodecimal number (e.g. 152 to duo = 108).

hex, hexadecimal

  Show as hexadecimal number (e.g. 623 to hex = 026F). Append an integer to specify the number of bits (e.g. 4 to hex16 = 0004).

sexa, sexa2, sexa3, sexagesimal

  Show as sexagesimal number (e.g. 7.33 to sexagesimal = 7°19′48″). For sexa2, arcseconds are hidden, and for sexa3 arcseconds are rounded.

longitude, longitude2, latitude, latitude2

  Show as sexagesimal latitude/longitude (e.g. -7.33 to latitude = 7°19′48″S). longitude2/latitude2 only shows degrees and arcminutes (e.g. -7.33 to latitude2 = 7°19.8′S).

bijective

  Show as bijective base-26 number (e.g. 731 to bijective = ABC).

binary16 / fp16, binary32 / float / fp32, binary64 / double / fp64, fp80, binary128 / fp128

  Show as binary representation of IEEE 754 16-bit (half precision), 32-bit (single precision), 64-bit (double precision), 80-bit (x86 extended format), or 128-bit (quadruple precision) floating-point number.

time

  Show in time format (e.g. 7.25 to time = 7:15.

roman

  Show as Roman numerals (e.g. 1984 to roman = MCMLXXXIV).

Unicode

  Show as Unicode character(s) (uses UTF-32 for conversion, e.g. 0x178 to Unicode = Ÿ).

base #

  Show using the specified base (e.g. 523 to base 20 = 163 or circumference(1) to base pi = 20).

bases

  Show as binary, octal, decimal, duodecimal, hexadecimal and Roman number (opens convert bases dialog with the mathematical expression).

rectangular, cartesian

  Show complex number in rectangular form (e.g. 0.28i − 2 to complex = 0.28i − 2).

exponential

  Show complex number in exponential form (e.g. 0.28i − 2 to exponential ≈ 2e^(3i)).

polar

  Show complex number in polar form (e.g. 0.28i − 2 to polar ≈ 2(cos(3) + i × sin(3))).

angle, phasor

  Show complex number in angle/phasor notation (e.g. 0.28i − 2 to angle ≈ 2∠3).

cis

  Show complex number in cis form (e.g. 0.28i − 2 to angle ≈ 2 cis 3).

fraction, 1/n

  Show as mixed or simple (prepend with -) fraction (1.25 to fraction = 1 + 1/4).

1/#

  Show as mixed or simple (prepend with -) fraction with a specific denominator (2.7 to 1/3 ≈ 2 + 2/3, 2.7 to -1/3 ≈ 8/3).

sci, scientific

  Show with scientific notation (123456 to sci = 1.234 56 × 105

eng, engineering

  Show with engineering notation (1011 to eng = 100 × 109

simple

  Show with non-scientific notation (1015 to simple = 1 000 000 000 000 000

partial fraction

  Show expanded partial fractions (e.g. 1 / (x2 + 2x − 3) to partial fraction = 1 ∕ (4x − 4) − 1 ∕ (4x + 12)).

factors

  Show factorized (algebraic or integer factorization, e.g. 3 645 678 to factors = 857 × 709 × 3 × 2 or x2 + 4x + 4 to factors = (x + 2)2).

calendars

  Show date in different calendars (opens calendar conversion dialog).

UTC

  Show date and time using UTC time zone.

UTC+/-hh[:mm]

  Show date and time using specified time zone (e.g. UTC+08).

If to is not preceded by an expression, the previous result will be converted.

Similarly where (or alternatively /.) can be used at the end (but before to), for variable assignments, function replacements, etc. (e.g. x+y where x=1 and y=2, x^2=4 where x>0, and sin(5) where sin()=cos()). Variables assignments can also be placed before the expression, separated by comma, e.g. x=1, y=2, x+y, but this syntax is more strict.

Note that to and where can only be applied to the whole expression. Everything before the operator is always treated as the expression to convert (or apply replacement to), and everything after as the conversion/replacement expression, regardless of any parentheses.

## Calculator Modes

&app; provides flexible parsing, calculation output and result display. There are several ways in which parsing of expression and display of results can be customized. These modes can generally be changed through the mode menu. The state of each mode can be saved under a name in Mode Meta Modes for quick access. The Preset and Default meta modes are always available and represents the state when &app; is load for the first time and the mode settings automatically loaded at each startup (and by default saved on exit), respectively. Different modes are summarized below.

Number Bases

  Non-decimal bases can be selected for display of numbers in the result and parsing of numbers in expressions. This include regular number bases (binary, octal, hexadecimal, sexagesimal) as well as sexagesimal time format and roman numerals. Other number bases, as well as base for expression input, can be selected from a dialog window accessed from Mode Number Base Other... or Mode Number Base Select Result and Expression Base....

  Supported Number Bases

  Radix | Digits | Comments
  --- | --- | ---
  2-10 | 1-10 |
  12 | 1-10, ↊/X/A/a, ↋/E/B/b | Supports all functions, variables and units that do not conflict with digits.
  11-36 | 1-10, A-Z (case insensitive) | Supports all functions, variables and units that do not conflict with digits.
  37-62 | 1-10, A-Z, a-z | Supports all functions, variables and units that do not conflict with digits.
  > 62 | Unicode characters (0 = 62) or escaped values (\523 = 523, \x7f = 127) | Does not support operators, functions, variables or units. Result display only uses escaped values except for with base 1114112 (the Unicode base).
  Negative bases (e.g. -2) | Same as corresponding positive base | Result display only supports negative integer bases.
  Non-integer bases (e.g. √2) | Same as corresponding integer base (rounded away from zero) | Result display only supports real bases.

  The convert number bases dialog (see ) and the programming keypad (see ) provides efficient conversion between common bases. For output of a single value to a specific number base use of the to-operator is recommended (see ). For input of a single number in a specific base, the `base()` function, which in addition supports non-numerical bases, or base prefixes (0b, 0o, 0d, and 0x for base 2, 8, 12, and 16, respectively) can be used.
Numerical Display

  These modes mainly control when numbers are displayed exponentially (e.g. 2.62E3 which equals 2620). In the default normal mode, numbers are displayed in exponential format if the exponent will be greater than the current precision. In scientific mode the lowest exponent is 3. In simple numerical mode the exponential format is never used and it is always used in purely scientific mode. In the engineering mode, the exponent is always a multiple of three. This is naturally equivalently true for numbers less than one and negative exponents. When the scientific modes are selected in the keypad (not from the menubar), negative exponents are automatically activated and sort minus last deactivated, while normal and simple modes do the opposite.

Indicate Repeating Decimals

  If this option is on, &app; will not round infinitely repeating digit sequences, if the digits in the sequence fits the maximum number of decimals. Instead … will be displayed after the repeated digits and the result indicated as exact (compare 9/11 ≈ 0,81818182 with 9/11 = 0,81 81…).

Rounding

  By default approximately displayed numbers are rounded towards nearest decimal (e.g. 2.64 ≈ 2.6, 2.67 ≈ 2.7), and away from zero if the number is halfway between two values (e.g. 2.65 ≈ 2.7, −2.65 ≈ −2.7). This can be changed by activating Round Halfway Numbers to Even (e.g. 2.55 ≈ 2.6, 2.65 ≈ 2.6) or Truncate Numbers (if activated, numbers are always rounded towards zero, e.g. 2.67 ≈ 2.6).

Show Ending Zeroes

  If this option is on, approximate numbers in the result will be appended with zeroes, so that the number of digits (after preceding zeroes) will equal the precision.

Negative Exponents

  If negative exponents is activated, division is shown as a negative power (e.g. x × y^-1 instead of x / y).

Sort Minus Last

  This option decides if minus signs should be avoided in the first positions of the result expression.

Complex Number Form

  Complex number can be displayed in rectangular/cartesian (e.g. 5i + 2), exponential (e.g. 5.39 × e^1.19), polar form (e.g. 5.39 × (cos(1.19) + i × sin(1.19))), or angle/phasor notation (e.g. 5.39∠1.19).

Rational Number Form

  This controls if rational numbers are displayed as fractions or not. The exact decimal fraction mode displays the number as a simple fraction, if the rational number does not have an exact decimal representation which can be displayed using the number of digits allowed by the current precision. The rational number 4/3 is displayed as 1.3333333 (or 1.333… if indicate repeating decimals is activated) in decimal fractions mode, as 4/3 in both exact decimal fractions and simple fractions mode, and as 1 + 1/3 in mixed fractions mode.

Unit Display

  The automatic use of prefixes for units in results can be toggled on and off. By default prefixes are only used for a selection of units (mainly standard SI and CGS units), but this can be changed to also include currencies or all other units. By default prefixes representing a power of ten not divisible by three (centi, deci, deca and hecto), as well the new SI prefixes adopted in 2022 (ronna, quetta, ronto, and quecto), are not used automatically. If denominator prefixes are not explicitly enabled, prefixes will only be set for the numerator in a fractional unit expression (e.g. 1 Mg/m or 1 kg/mm), unless there is no unit in the numerator. Binary prefixes are never used automatically, unless activated for information units (bits, bytes, etc.) in the preferences dialog.

  Units can be automatically converted to base units or the optimal units in results. Optimal conversion means that the number of units in the result is reduced to as few units as possible. Only SI units are used for conversion. If Convert to Optimal SI unit is activated, non-SI units are converted to SI units, even if equally or less optimal than the original unit(s). In optimal unit mode, currencies are converted to the local currency, unless deactivated in the preferences dialog. Mixed units conversion allows certain units, such as time units and many imperial/U.S. customary units, to be converted to a combination of appropriate units, e.g. 60.2 minutes = 1 hour to 12 seconds.

  The place units separately alternative controls the display of unit expressions in result. If it is enabled (default) units will be displayed separate from other parts of the expression at the end (compare (5x × m)/(y × s) and 5x/y m/s).

Abbreviate Names

  The display of unit, prefix, variable and function names can be controlled by selecting to display abbreviations or full length names (e.g. 5 cm or 5 centimeters). Both abbreviations and long names can however always be entered in expressions.

Approximation

  When always exact mode is on, the calculation will not go further than what can be calculated exactly (e.g. sqrt(2 + 3) = sqrt(5)). The default Try Exact mode, will calculate the result exact as far as possible and then approximately. Approximate mode will directly calculate an approximate result, thus being a bit faster but giving a less correct approximate indication (sin(pi/2) return approximately one instead of exactly one). If the interval arithmetic mode is activated the precision of the final result is guaranteed by calculating an interval for every approximate value (See ).

Assumptions

  This controls the default assumptions for unknown variables without explicitly defined assumptions. See . The assume denominators non-zero alternative makes it possible to avoid the situation where expressions such as (x-1)/(x-1) can not be further simplified because the denominator might be zero (if x equals 1). With this alternative activated the example can be reduced to 1.

Parsing Mode

  These options control how expressions are interpreted. There are three main modes, which mainly controls if implicit multiplication is handled differently from explicit multiplication and if spaces are taken into account or not. See . If the read precision option is activated, decimal numbers are interpreted as approximations with precision equal to the number of digits (e.g. 1.1 × 3.20 = 1.1±0.05 × 3.20±0.005 ≈ 3.5±0.2).

Precision

  Precision specifies the default number of significant digits displayed and determines the precision used for approximate calculations. The internal precision is higher than the one specified, but will nevertheless not completely protect against loss of significance/catastrophic cancellation (and you will not be alerted unless interval arithmetic is activated).

Decimals

  In the decimals dialog, the number of decimals displayed can be controlled. This includes minimal (will fill out with zeroes) and maximal number of decimals (will round numbers).

### The RPN Mode

The Reverse Polish Notation mode can be activated from Mode RPN Mode, Ctrl R or from the context menu of the expression entry. For details about what Reverse Polish Notation is and how it generally works, see for example the RPN article at Wikipedia.

Central to the RPN mode is the stack, a list of registers/values that is operated on by functions and operators. The stack has a variable number of registers which can hold an unlimited number of values. The stack size is dynamically changed when a new value is added and the first value on the stack is shown in the result display. Mathematical operators such as plus and minus then operates on the first two, last added, values on the stack. The second value is changed with input from the first value. For example, the minus operator subtracts the first value from the second.

For example, `5 ENTER 3 + 2 /` adds 5 to the stack, then adds 3 to the stack and moves 5 down a step and adds 3 to 5. The first value, 3, is removed from the stack and the value left is 8. Then 2 is added to the stack and 8 is divided by 2, resulting in 4. This would in a single expression with non-RPN (infix) syntax be entered as (5 + 3)/2.

Functions operate on the top values of the stack. Functions which require multiply arguments, fill the arguments in reversed order from the top (e.g. `5 ENTER 2 ENTER rem` equals rem(5, 2)). Functions with a vector argument use all stack registers (unless the top value is a vector). This is quite useful for statistical functions (e.g. `5 ENTER 2 ENTER 3 ENTER 4 ENTER harmmean` calculates the harmonic mean of 5, 2, 3, and 4 and leaves the result, 3.1169, as the only value on the stack).

When the RPN stack is enabled, full expressions can still be entered (you can add e.g. 5x + 3 + 23 + sin(2) directly to the stack). The buttons on the keypad do not insert operators and functions in the expression entry, but instead apply them to the stack. This is also true for the keys on the keyboard, unless deactivated in the preferences (Edit Preferences, Use only keypad keys for RPN). Enter calculates the current expression and adds it to the stack (calculated mathematical expressions are automatically added to the stack when the RPN stack is enabled). If the expression entry is not empty when applying an operator or function to the stack, the expression is first calculated and added to the stack. If the expression only contains an operator or a single function without arguments, the operator/function is applied to the stack.

RPN Mode

The RPN mode adds a third page to the main window, for display and manipulation of the values on the stack. This shows a list of values on the stack, with the last added value on the top.

On the right are buttons for manipulation of the stack. The buttons move the selected value up (Ctrl Up) or down (Ctrl Down), move it to the top (Ctrl Right), copy it (Ctrl Shift C), edit it, or remove it (Ctrl Delete), in order. If no stack row is selected, the up and down buttons rotates the stack, the swap button swaps the places of the first and second value and the copy and delete buttons acts on the top value of the stack. The button between copy and delete enters the top value from before the last numeric operation (Ctrl Left). The last button removes all values from the stack (Ctrl Shift Delete).

On the left are buttons for applying mathematical operations to the stack. The top left buttons applies addition, subtraction, multiplication, division, and exponentiation to the top two values. If only one value is available addition, multiplication, and exponentiation uses this value twice, while the subtraction button negates the value and the division button calculates the reciprocal. The buttons below negates the top value, calculates the reciprocal, and calculates the square root of the top value. The last button calculates the sum of all values on the stack. Changes in the display of results only affects the first value on the stack.

Reverse Polish Notation can also be used directly in expression. This can be activated or deactivated separately from the RPN stack (Mode Parsing Mode RPN Syntax). When using RPN syntax, a temporary stack, separate from the previously mentioned stack, is created from the contents of each mathematical expression entered. To calculate (5 + 3)/2, as in the example above, with RPN syntax you should enter the expression 5 3 + 2 /. Instead of actually pressing enter on the keyboard, each separate value on the stack is separated by a blank space.

## Propagation of Uncertainty and Interval Arithmetic

Two different algorithms for calculation of intervals or propagation of uncertainties are supported (selectable from Mode Interval Calculation). This applies to numbers, defined using the `interval()` function or ± notation, or with read precision enabled, and variables, including physical constants, with specified standard uncertainty. The uncertainty will be calculated separately for non-differentiable functions.

By default the variance formula is used. Intervals are with this method treated as values with measurement uncertainties (the value 5±0.01 has a standard deviation of 0.01). The final uncertainty, or error, is estimated using partial derivatives, as shown below. For expressions involving complex numbers, the imaginary uncertainty are calculated separately.

Variance Formula

Alternatively interval arithmetic can be used. Intervals are treated as an absolute range of values and the result represents all possible values for every value within all ranges in the expression. For monotonic functions the endpoints in the result corresponds to the function values for the endpoints of the input (e.g. interval(x, y)^3=interval(x^3, y^3)).

Interval arithmetic is also used implicitly, regardless of selected interval calculation algorithm, for all approximate calculations to keep track of precision changes, and gracefully handle for example catastrophic cancellation (in subtraction two nearly equal numbers). The behavior can be (de)activated using Mode Approximation Interval Arithmetic.

Some non-invertible functions (including bessel and airy functions) do not properly support interval arithmetic and only the function values for the endpoints of the interval are calculated. Trigonometric functions returns correct intervals for real and imaginary numbers, but will in some cases for complex numbers with both a real and imaginary part return a too wide interval. Generally, the resulting interval will be guaranteed to include the true interval, but may for non-trivial expression (especially involving complex numbers) return an interval that is too wide.

The result is by default shown as an ordinary number with the number of significant digits determined by the size of the uncertainty (2.11±0.03 = 2.1), or the width of interval, unless the interval is too wide. If the `interval()` function has been used in the expression the result is by default displayed as an interval, and if ± notation (or the `uncertainty()` function) has been used, it will also be used in the result. The default behavior can be changed fromMode Interval Display. The midpoint alternative displays the value halfway between the lower and upper limit of the interval (interval(2.075, 2.15) = 2.1125). Note that, for the plus/minus notation, the same midpoint (note that when interval arithmetic is enabled this does not necessarily equal the result for the midpoint of intervals in the expression) is displayed in front of the plus/minus symbol. In plus/minus notation, the uncertainty is displayed with two significant digits, with the exception that all digits before the decimal separator are always shown.

## Variables

Variables are used to conveniently store a fixed value/result under a name. Variables can store everything that a result may contain, including numbers, units, variables, unsolved expressions and functions etc.

There are two different kinds of variables: known and unknown. Known variables represent a fixed value, usually a number, while unknown variables represent a range or type of values (e.g. a non-negative integer).

Some common constants that can only be approximately represented by a real number, such as pi and e, are special known variables. They are not fixed but are recalculated each time precision changes, thereby not compromising the arbitrary precision of &app;.

The `ans` variable always contains the most recent result. For multiple results of an equation, this variable contains a vector of solutions (access the first solution using ans(1)).

The unknown variables x, y and z are predefined. They cannot be deleted, but changed. By default they use the default assumptions.

For a complete list of available variables see or the variable manager.

### Variable creation/editing

Store Result

The easiest way to create a known variable is to store the current result. This can be done by clicking the STO button or selecting File Store Result.... Type a name for the variable in the dialog that pops up. The name is used in expressions (e.g. var_1 + 5 if the variable is named var_1). Temporary variables (placed in the Temporary category) disappear when &app; is closed.

Known variables can also be created from scratch by selecting File New Variable or by clicking New in the variable manager. The value is entered in the text field below the name. Any mathematical expression is allowed as value (e.g. π m or sin(2) + ln(3)).

It is possible to specify multiple names, and various properties of these names, by clicking the icon on the right side of the name field.

The second page of the dialog provides fields for entry of descriptive name (shown as title in menus), category, and description.

New Variable

Alternatively values can be stored in variables using the `save()` function, or the associated :=/= operators (e.g. save(v1, 5) or v1:=5, save(v1, ln(5)+2,,,1) or v1=ln(5)+2).

The dialog for creation of unknown variables is accessed by selecting File New Unknown Variable. Instead of a value, an assumed type and sign can then be selected.

Edit a variable by clicking Edit in the variable manager, or using the context menu (right-click) of the corresponding menu item in the menu of the STO.

The special MR (= right-click) variable is updated using the classic MC (AC right-click), MS ((= middle-click), M+ (+ right-click), and M− (DEL middle-click) operations.

### Vectors and Matrices

Vectors and matrices are most effectively used stored in a variable. &app; provides separate tools for these variables. They use a different dialog, where each element can be edited separately as in a spreadsheet. As with other variables, click Edit in the variable manager to edit a matrix/vector variable, but to create a new, select File New Matrix or File New Vector.

Matrix/Vector Edit Dialog

In this dialog, name, category and descriptive name are typed in as usual, but instead of a single value field, multiple values are entered using a table. The number of rows and columns are selected using the controls above the table. In a vector this only determines how many cells that are shown in the table and empty cells will be ignored. For matrices, each cell in the table is an element in the matrix.

Matrices and vectors can also be loaded from data files. These files must be plain text files with values organized in separated rows and columns. Select File Import CSV File... and a dialog window pops up. First select the file to import and then specify whether it shall be imported as a matrix or vectors. A name, descriptive name and category can optionally be typed in. If the name field is empty, the file name will be used instead. After that, the row in the file where the data starts should be specified, as well as whether this first row contains column headings. Finally the delimiter, used to separate columns in the file, must be selected. Click OK and variables will be generated from the file. If vectors are to be generated and the file contains more than one column, the name will be used as a subcategory and each variable will add the column heading (or Column 1, Column 2, ...) to the name and the descriptive name.

Import CSV Dialog

The `load()` function can be used to access a CSV file directly in an expression. The reversed action is also available with `export()`, or the dialog accessed with File Export CSV File... or from the variable manager.

## Functions

Functions are essentially mathematical formulas. They are used to store expressions with variable values, arguments. To execute a function, the values for a number of arguments need to specified. These arguments are then inserted into the expression, making it possible to calculate.

Functions are normally entered in an expression by writing the name followed by arguments, separated by commas (or semicolons in languages with comma as decimal point), in parenthesis, thus following the syntax `name(arg1, arg2, ...)`. &app; will give a helpful error message if the arguments are not correct.

Insert function dialog

The insert function dialog presents an easy way to insert a function and its arguments.

Although it can lower the readability of an expression, it is perfectly legal to skip the parenthesis and put the arguments after a space, and end with a space or operator. This is most useful in short expressions with single argument functions (e.g. sqrt 5).

Argument types include:

- Free — anything

- Number — a numeric value

- Integer — a whole number

- Symbol — a defined or undefined unknown variable

- Text — a free text string

- Date — a date in local or standard format (Year-Month-Day, recommended)

- Vector

- Matrix

- Boolean — 0 for false, 1 for true

- Object — the name of a variable, function or unit

- Variable — the name of a variable

- Function — the name of a function

- Unit — the name of a unit

- File — the path to a file

- Angle — an angle used in trigonometric functions, meaning a number and an angle unit. If no angle unit is included the default is used.

The argument can be restricted by further conditions. For example that a number must be positive.

Most arguments (primarily number arguments) can be replaced by a vector. The function will then be calculated for each vector element and a new vector will be returned. If more than one argument are supplied to a function that takes exactly one argument, each argument will be treated as elements of a vector.

### Available Functions

Here the main function categories and some of their members are described, to give an overview of available functions. For information about separate functions and a complete list of all available functions see or the function manager.

Algebra

  Contains `sum()` and `product()`, which corresponds to the sum and product signs. `solve()` solves equations (e.g. solve(x × 2 = 8) returns 4 meaning that x equals 4). Use `solve2()` and `multisolve()` to solve multiple equations with multiple variables.

Calculus

  Includes `diff()`, which calculates the derivative of an expression with optional arguments with respect to (default x) and order (default 1), and a limited integration function.

Combinatorics

  Contains functions such as `perm()` for permutations, `comb()` for combinations, and `factorial()`.

Complex Numbers

  Contains functions useful for calculations with complex numbers, including `arg()` for principal argument and `conj()` for conjugate.

Data Sets

  A data set consists of a set of properties and objects, which can be accessed by a function which takes two arguments — object and property. The function returns the object's value for the selected property. For example, the data in the Elements data set is accessed with the `atom()` function, with the element (referenced using atomic symbol, number or name) and property (e.g. weight) as arguments. The special property info displays all properties of the object in a dialog window.

Date & Time

  Includes `days()` and `yearfrac()` which returns the number of days and fractional years, respectively, between two dates.

Exponents & Logarithms

  Standard logarithmic and exponential functions. `ln()` calculates the natural logarithm of a number, while `log()` allows a choice of base as the second argument. The `cbrt()` and `root()` functions only calculates real roots. For roots of odd degree the root functions give a different answer than the exponential operator, ^, for negative values (cbrt(-8) = -(8)^(1/3) = -2, but (-8)^(1/3) = 1 + 1.73i).

Economics

  This essentially includes most of the financial functions that are usually found in spreadsheet applications.

Elements

  This category includes functions to retrieve data such as atomic weight. The `atom()` function opens a window with available data of an element. These functions accept the number, symbol or name of the element as argument. The data are loaded on demand.

Geometry

  Category with formulas mostly for calculation of circumference, area and volume of geometric shapes.

Logical

  Some procedural functions mainly for use in other functions. These include `if()`, which tests a conditional expression and returns a value depending on if the expression evaluates true or false, and `for()`, which processes a value while a condition is true.

Matrices & Vectors

  These are functions that generate, access and process matrices and vectors. The `vector()` function generates a vector from a variable number of arguments for elements, while `matrix()` first needs the number of rows and columns and then the elements from left to right. Matrices can also be imported directly from a CSV file with `load()`.

  Separate elements at a specified row and column are accessed with `element()`. Other functions include `det()` for calculation of the determinant of a matrix and `inverse()` which returns the inverse of the given matrix, as well as functions such as `sort()` and `rank()`.

Miscellaneous

  A category for functions that do not fit elsewhere.

Number Theory

  Contains subcategories arithmetic, number bases, and rounding, in addition to functions such as `abs()`, which returns the absolute value of a number (| can also be used; e.g. |-5| = abs(-5) = 5, and `gcd()`, the greatest common divisor. `round()` is the standard rounding function. The functions for number bases translates a text string, representing an expression with numbers in a different base, to a decimal number. Includes `bin()` for binary numbers, `hex()` for hexadecimal numbers, `oct()` for octal numbers and `base()` for numbers in a any other base.

Special Functions

  Includes `beta()`, `gamma()` and similar functions, as well as Riemann zeta (`zeta()`) and Kronecker delta (`kronecker()`).

Statistics

  Contains a lot of functions for descriptive statistics and some statistical tests. Data sets are stored as vectors. Generally, functions with a vector/data set as last argument can take elements/samples as a variable number of arguments directly instead of in a vector (e.g. mean(1, 2, 3) equals mean(vector(1, 2, 3))). Also contains the `rand()` function, which returns a pseudo random number between 0 and 1 (with no argument, or zero), or a random integer between one and the specified number.

Trigonometry

  Trigonometric functions, including `sin()`, `cos()`, `tan()`, `sec()`, `csc()`, `cot()`, and hyperbolic and inverse versions of those. These functions take as argument an angle. If the default angle unit (Mode Angle Unit) is set to none, the argument must have an angle unit appended (degrees, radians or gradians), otherwise the default unit will be appended automatically (and removed from result of inverse functions).

Utilities

  Various utility functions. Most are only useful in definition of other functions. The `save()` function can however be a quick way of storing a value in a variable, and `csum()` can be a powerful tool for data processing. This category also contains some functions, such as `char()` and `ascii()`, that might be useful for programmers. `replace()` provides an easy way of replacing unknown variables by known expressions in a value (e.g. replace(5x^2 + x, x, 3) equals 5 × 3^2 + 3).

### Function creation/editing

Functions are a bit more complex than variables, but can nevertheless be relatively easily created. Select File New Function, or click the f(x) on the keypad or New in the function manager and a function edit dialog pops up.

The function edit dialog is divided in three pages, where the first page contains the only required properties — name and an expression. x, y and z with or without (default) a backslash are used as argument placeholders in the expression.

Function Edit Dialog

First enter a name, used to reference the function in an expression. Then enter an expression below.

The expression of a function is basically a normal expression with placeholders for arguments. The expression x^4 creates a function which calculates the fourth power of a single argument. If you name it for example sqsq, sqsq(2) will calculate 2^4.

The argument placeholders consist of a backslash and a letter — x, y, z for the 1st, 2nd and 3rd arguments and a to u for argument 4 to 24. The backslash can however be omitted, but avoids any possible conflict with existing variables, units and functions used in the expression. The argument symbols are replaced by entered arguments when a function is calculated. They also decide the number of arguments that a function requires. For example the function for triangle area (base × height / 2) has the name triangle and the expression (\x × \y)/2, which gives that triangle(2, 3) equals (2 × 3) / 2 and returns 3 as result. An argument can be used more than one time and all arguments must not necessarily be in order in the expression.

Additionally, optional arguments can be put in the expression with upper-case (X, Y, Z, ...) instead of lower-case letters (x, y, z, ...). The default value should be put in curly brackets after the letter (e.g. \X{2}). The default value may be omitted and is then zero. All additional arguments after an optional argument must also be optional.

Function Edit Dialog

A required condition, sub-functions, and argument definitions can optionally be specified in the second page (Details).

The condition specifies an expression which must evaluate true before the function is calculated. This follows the same conventions as function expressions. For example, if the value of the second argument must be higher than the first, \y > \x may be entered as a condition.

Sub-functions can be useful for complex functions, they use the same syntax as the main expression, and are references using a backslash followed by a number (e.g. \1 for the first sub-function). The sub-function can be inserted in the main expression as a precalculated value or intact (meaning that the subfunction might be recalculated for each occurrence in the main expression).

Name, type, and required conditions can be specified for each argument.

The third page allows entering of category, descriptive name (shown as title in menus) and description. The function can also be hidden from menus with the corresponding check box, which can be useful for functions only used in other functions.

Global, system-wide functions can not actually be changed by the user, but if one of these functions is edited, they are deactivated and seemingly replaced by a new function. Some functions are however hard-coded and cannot be changed by the user. Once the user function is removed or deactivated the original function is automatically reactivated.

## Units

Units give numbers meaning in the real world. They specify what is measured by the numbers and the scale used. &app; fully incorporates units in calculations and includes all standard SI units as well as many non-standard local units. For a complete list of available units see or the unit manager.

### Currency

Among units, &app; has support for currencies with up-to-date exchange rates. Currencies are normally referenced with the standard three letter code due to name clashes, but a number of currency unit can also be accessed through their regular name and symbol. U.S. dollars can, for example, be referenced both as USD and dollar/dollars or the $ symbol, unless the same name and/or symbol are used by the local currency.

The exchange rates can be updated manually using File Update Exchange Rates, or automatically at specific intervals (by default once every week, but this can be changed in the preferences dialog), when needed (when currencies are converted).

### Conversion

Expressions can be converted to a specific unit directly in the expression entry with the to operator (right arrows, including -> are also supported), which converts the left-hand expression (or the previous result) to a specified unit (e.g. 5 feet + 2 inches to cm converts the result of 5 feet + 2 inches to centimeters). Unit expressions may contain units, prefixes, exponents, multiplication and division. By default, no prefix will be added to units typed without prefix, but this behavior can be modified by putting a question mark in front of the unit expression (6 561 ft to m ≈ 2000 m but 6 561 ft to ?m ≈ 2 km). Type to optimal to get optimal unit, to base for base units, or to mixed to force the use of mixed units (see below). Note that the conversion is always applied to the whole left-hand expression, ignoring any unmatched parentheses. The to operator can also be used for other types of result transformations (see ).

Alternatively the unit conversion view can be used. It is opened using Conversion, Ctrl O, Edit Convert To Unit Expression... or Ctrl T (the last two options moves the focus to the unit expression entry). Enter a unit expression in the text entry and press Enter (or click Convert), or select a unit from the list. An appropriate unit category will automatically be selected from units in the current result. If Continuous expression is checked subsequent results will automatically be converted (if the conversion view is open), and if Add prefix is checked the optimal prefix will be set for unit expressions without any prefix. A unit can be inserted directly into the expression entry from the list using middle click or the context menu.

Unit Conversion View

The result context menu and the menu associated with the to (x ➞) keypad button also provides a list of units for conversion.

The final way to convert the result to another unit is to use Edit Convert To Unit menu or to press Convert Result in the unit manager, which also provides quick conversion of a value between two selected units. Edit Set Prefix can be used to select a prefix.

It is also possible to let &app; automagically convert the result to appropriate units with Edit Convert To Optimal Unit or Edit Convert To Base Units (or the corresponding options in the result context menu). If instead the corresponding choice is selected from Mode Unit Display (or the result context menu), each result will automatically be converted until the choice is deactivated (Mode Unit Display No Automatic Conversion).

By default (controlled by Mode Unit Display Convert To Mixed Units) certain units, such as time units and many imperial/U.S. customary units, are automatically converted to mixed units (e.g. 60.2 minutes = 1 hour to 12 seconds). When explicitly converting to a specific unit the integer value of the selected unit is preserved (1.51 h to min = 90 min + 36 s) and mixed units is not used if otherwise the unit would not be present in the result (6 in to ft = 0.5 ft). This behavior can be modified by prepending the unit with a plus or minus sign (e.g. 174 cm to +in ≈ 5 ft + 8,5 in, 1.51 h to -min = 90.6 min).

### Unit creation/editing

There are three different unit classes in &app; — base units, named derived units, and (unnamed) derived units. Base units are standard units that form the basis for all other units. Meters and seconds are typical base units. Derived units are defined in relation to other units. Named derived units are defined in relation to a single other unit, with an optional exponent (e.g. hour is defined as a named derived unit that equals 60 minutes which in turn is defined in relation to seconds). Unnamed derived units are defined by a unit expression with one or multiple units (e.g. J/s). They are primarily useful as basis for named derived units (e.g. W = J/s), and for simplified conversion and entry of the specified unit expression.

Select File New Unit, or click New in the unit manager, and the unit edit dialog pops up.

Unit Edit Dialog (General)

Base units and named derived units normally have three different name forms defined for use in expressions — abbreviation (e.g. m), singular (meter) and plural (meters). Unnamed derived units only have an internal name, which is used to reference the unit in definitions of other units, but which should not be used in mathematical expressions.

In addition category and descriptive name can be specified to keep the units well organized. A unit can be hidden from unit menus with the corresponding check box (this is primarily useful for some unnamed derived units which are only defined as basis for named derived units).

Depending on the unit class, different elements in the relation page of the dialog will be enabled.

Unit Edit Dialog (Relation)

For named derived units, base unit, exponent and relation must all be specified (although the exponent and relation may both be left as 1). The base unit can be of any unit class and it is recommended that named derived units are defined in relation to the closest unit (e.g. 1 ft = 3 hands, 1 hand = 4 in, and 1 in = 0.0254 m). The relation is usually just a number that tells how large quantity of the base unit is needed to get the derived unit (derived unit = relation × base unitexponent).

It is possible to create units with non-linear relation to the base unit. Replace the factor with \x and the exponent with \y (e.g. \x + 273.15 for degrees Celsius with Kelvin as base unit). For non-linear relations the reverse relation (for conversion back from the base unit) should also be specified (\x - 273.15 for degrees Celsius).

Base unit mixing can be enabled (by default) for named derived units. This is used for units such as feet and minutes, which are often combined with other units instead of using decimals (e.g. 5.25 ft = 5 ft + 3 in, 250 s = 4 min + 10 s). This behavior can be fine-tuned using the priority and minimum base unit number properties.

For unnamed derived units a unit expression, with one or multiple units, must be specified in the base units field. This expressions may only contain units, prefixes, exponents, multiplication and division (e.g. km/h).

## Plotting

Plotting in &app; is done through an external program, Gnuplot. Thus Gnuplot needs to be installed separately, and found in the executable search path, for plotting to work.

To plot functions or data sets, select File Plot Functions/Data, which brings up the plot dialog. The plot dialog consists of three tabs/pages — the first for the data, the second for the function range and sampling rate, and the last for control of function sampling and appearance.

Plot Data

Plot functions are normal expressions that represent f(x) in y=f(x) (e.g. sin(x)). The x can be specified as a different unknown variable (x, y, z) or a quoted text string (actually any mathematical expression which will then be matched in the plot expression and replaced by the values on the x axis) in the variable entry below the function/data list.

To plot a data set, enter an expression that results in a matrix or vector. Select Vector/Matrix below and vectors will appear as one series and matrices will appear with each column or row (if selected) as a series, If the paired matrix option instead is selected, the first column/row of the matrix will constitute the y-values and the second the x-values.

Type in an expression, press Enter and a new window will open with the plot. The title of the series, the diagram style and smoothing of the line can also be set. The series modified must be selected in the list and to apply changes click Apply. More series that will appear in the same plot window can be added. If the scale of the y values differ, series can be put on a secondary y-axis.

Even though &app; does all the calculations before handing over the data to Gnuplot, the resulting data must only consist of pure numbers, as Gnuplot knows nothing about the functions, variables, units, etc. of &app;.

For functions, the function range — min and max x value, and the number of values or the size of the step between each y value calculated — can be specified in the function range page.

Plot Settings

A title can be set to appear at the top of the plot, as well as labels for the x and y axis. The appearance can also be controlled by selecting or disabling legend placement, displaying/hiding the grid and borders on the top and the right side of the diagram and choosing color or monochrome graphics. The x and y scales can be made logarithmic by clicking the box on the right and filling in a desired logarithmic base.

To update the plot window, click Apply at the bottom of the dialog.

Gnuplot

The plot can be saved as an image file. Click Save and select a file name and folder. The extension of the file name will decide the file type (.png for PNG image, .svg for SVG, .ps for postscript, .eps for encapsulated postscript, .tex for LaTeX, and .fig for XFig). Default is to save as a PNG image.

&appendixa; &appendixb; &appendixc; &examples;