Calculator

Any time you enter a number into an edit box or command line, you may use the internal calculator. This calculator provides for basic operations: addition, multiplication, subtraction and division. You may use brackets, basic goniometric functions (tan, sin, cos) and it is possible to calculate powers of numbers. The calculator takes account of priorities of operators.

If you want to use the calculator to calculate the value in the input box, you must start with the equals sign (=).

As soon as you type the first character, a temporary field - "bubble" - appears just below the input box. This new field calculates the result of the input formula. If the field shows "error" than the syntax of the formula is invalid.

Valid operators and functions

=

obligatory, this character must start the formula

+

addition; e.g. 1+2

-

subtraction; e.g. 2-1

*

multiplication; e.g. 1*1

/

division; e.g. 2/1

^

power;; e.g. 2^3

()

brackets; e.g. 2*(3+3)

e

exponential notation, useful for large numbers; e.g. 1e5

sin()

sinus; e.g. sin(45)

cos()

cosine; e.g. cos(30)

tg()

tangent; e.g. tg(45)

The calculator may be used also in the situation when set of numbers is to be input, e.g. when point coordinates are defined. In such a case any of the coordinates can be input as formula, and any of the coordinates can be input as number.

Example 1

The input of point

1;=2*(3+2);sin(45)*5

is "decoded" as:

X = 1

Y = 2*(3+2) = 10

Z = sin(45)*5 = 3,5355339

Example 2 

image\calculator.gif