## MUME Help

# CALCULATOR

The Calculator is a mobile
whose only purpose is to help you
calculate simple mathematical formulae. If you
tell it the formula you
need to have evaluated, it will
tell you the result back.

Example:

` > ``tell calculator 2 + 3 * 4`

The Calculator tells you '14'

If you feel lazy, `t calc`

will work as well.
There is a short help available if
you tell it
`help`

or `?`

.

The calculator internally works with double floats, so there's a limit to its precision.

If you're interested in details, here's the syntax it understands:

expression = factor | factorThe only constants available are`+`

expression | factor`-`

expression factor = unary | unary`*`

factor | unary`/`

factor | unary`mod`

factor unary = exp |`-`

unary |`+`

unary | function unary exp = atom | exp`^`

unary | exp`**`

unary atom = number |`(`

expression`)`

|`|`

expression`|`

| constant number = [0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?

`pi`

, `e`

and
`inf`

(or `infinity`

).
The functions available are `sin`

, `cos`

,
`tan`

, `asin`

, `acos`

, `atan`

,
`ln`

, `exp`

,
`log`

(base 10
logarithm), `floor`

(round down), `ceil`

(round up),
`trunc`

(truncate decimals), `round`

(round away from
zero), and `sqrt`

.

The calculator can also factorize numbers:

` > ``tell calculator factor 4711`

The Calculator tells you 'The prime factors of 4711 are 7 and 673.'

See also: | CONVERTER |

Generated on Sun Jun 20 15:00:20 2021