Calculator
A small calculator that stays open beside the model. It works out expressions with lengths (metres) and angles, keeps a history and remembers the last result.
Calculator
Opens the Calculator window. The window is not modal: you can leave it open and keep working in the view. If it is already open, the command brings it forward.
Where to find it
Tools tab → Calculate group → Calculator (Calculator).
How to
- Click Calculator. The cursor is in the Expression box.
- Type an expression, for example
sqrt(3^2 + 4^2) m,2.5 m + 30 mm,sin(30 deg)oratan2(1, 1). - Press Enter or click Work out. The result appears under the box and the line is added to the top of the History list. The box is cleared.
- Click the copy button next to the result to put the result text on the clipboard.
- Double-click a line in History to bring its expression back into the box for editing.
- Click Clear history to empty the list, or Close (or Esc) to close the window.
Numbers and units
- Numbers use a dot as the decimal mark and may have an exponent:
1.5,2e3,1e-5. - A unit written after a number or after a parenthesis makes it a length or an angle:
5 mm,(1 + 2) m,pi rad.
| Unit | Meaning |
|---|---|
| m, mm, cm, km | Length |
| deg (or °), rad | Angle |
- A result that is a length is shown in metres (
12.5 m), an angle in degrees (30°), a plain number without a unit. Trailing zeros and rounding noise are removed (0.1 + 0.2reads0.3).
Operators
+ - * / ^ and parentheses. ^ is right-associative (2^3^2 is 2^9).
| Combination | Result |
|---|---|
| length + length, angle + angle, number + number | Same kind |
| length or angle × number, or ÷ number | Same kind |
| length ÷ length, angle ÷ angle | Plain number |
| length + angle, length × length, number ÷ length | Error |
^ | Plain numbers only |
Functions and constants
| Function | Takes | Gives |
|---|---|---|
| sqrt, ln, log, exp | A plain number (ln and log need more than zero, sqrt needs zero or more) | Plain number; log is base 10 |
| sin, cos, tan | An angle, or a plain number taken as degrees | Plain number |
| asin, acos, atan | A plain number | Angle |
| atan2(a, b) | Two values of one kind | Angle |
| pow(a, b) | Two plain numbers | Plain number |
| abs, floor, ceil | One value | Same kind |
| round(x) or round(x, digits) | A value and optionally 0 to 15 digits | Same kind |
| min, max | One or more values of one kind | Same kind |
The constants are pi and e (case does not matter).
Variables and the last result
ansis the result of the last successful calculation.x = 2 mstores the value in the variablex. The result is also stored inans. Names are not case sensitive. A name that is a function, a unit, a constant oranscannot be a variable.- An expression that starts with
+,*,/or^continues fromans: after3 m, typing* 2gives6 m. - Clear history removes the list but keeps the variables.
If something goes wrong
The message is shown in red under the box with a warning sign. Nothing is added to the history.
| Message | What to do |
|---|---|
| Type an expression. | The box is empty. |
| Unexpected '…' at position N. | Fix the character at that position. |
| The expression ends too soon. / A closing parenthesis is missing. | Complete the expression. |
| Unknown function '…'. / Unknown name '…'. | Check the spelling; set a variable first with x = …. |
| Cannot add or subtract a length, an angle and a plain number. | Give both sides the same kind. |
| Cannot multiply two lengths or angles. / Cannot divide by a length or an angle. | Only a number can multiply; divide only by a number or by a value of the same kind. |
| Division by zero. | Change the divisor. |
| '…' takes a plain number. / '…' takes an angle or a plain number. | Remove the unit from the argument. |
| '…' takes N argument(s). / '…' takes N to M arguments. | Fix the argument count. |
| The arguments of '…' must be of one kind. | Use the same unit in all arguments. |
| The square root of a negative number. / The logarithm of zero or a negative number. | Change the argument. |
| '…' already has a unit. | A unit is written once. |
| A power takes plain numbers. | Remove units from the base and exponent. |
| '…' cannot be used as a variable name. | Pick another name. |
| The result is not a finite number. | The value is too large or undefined. |