Calculabo

An elegant yet powerful calculator app.

Variables

Calculabo supports variables to store mathematical objects. Examples of mathematical objects are scalars, matrices, tuples and functions.

Names

A variable name must consist of one or more letters. Both Latin and Greek letters are allowed and these may be mixed. It is however not permitted to use capital Greek letters that look identical to Latin letters (e.g. capital alpha) or mathematical operators (e.g. capital pi).

To type a Greek letter in Calculabo, press Ctrl+G to transform the next letter you type into a Greek one.

Assignments

Use the $≔$ operator to assign values to variables. In Calculabo, you get this symbol by simply pressing = on your keyboard. The right-hand side contains the expression that is assigned to the variable in the left-hand side. It is permitted to use the current value of the variable to be assigned in the expression for its new value.

Example

$a≔1$
$1$
$a+2$
$3$

You can also assign values to multiple variables in a single statement. It is also possible to use so-called destructuring assignments by constructing a tuple of variables in the left-hand side of the statement.

Example

$x≔y≔2$
$2$
$y$
$2$
$⟨x,y⟩≔⟨3,4⟩$
$⟨3,4⟩$
$y$
$4$

Built-in variables

Calculabo contains a large amount of built-in variables for standard mathematical functions and constants. Their names are however not reserved: you can assign custom values to these variables, just like normal variables. This will simply override their built-in values. You can also copy the standard value of a built-in variable to another variable before overriding it.

There is one special built-in variable named $ans$. It contains the value resulting from the last command entered in the Calculabo console. If you assign a custom value to it, it will stop changing automatically and start behaving like a normal variable.

Example

$10$
$10$
$ans+1$
$11$
$ans≔ans+2$
$13$
$ans+3$
$16$
$ans+4$
$17$