calc command
The calc command can be used for performing simple calculations.
Syntax
calc expression
Parameters
expression The expression you specify may consist of numbers, operators, and functions. The following operators are supported: The following functions are supported:
+ plus, unary plus - minus, unary minus * multiply / divide ** power % remainder & bitwise AND | bitwise OR ^ bitwise exclusive OR ~ unary bitwise complement. Hexadecimal numbers can be entered in the formats exemplified here: 0xAba, xff, #Cafe, x'4f'.
cos cosine max maximum min minimum random random number sin sine sqrt square root tan tangent.
The result is displayed on the message line.
Status
The status parameter is not affected by this command.
Examples
calc 1024 calc (298 + 584/4) / 111 calc max(3., -1, 5/2, random())
Editor commands, actions, and parameters