Arithmetic operations

Description:

Perform four arithmetic operations on two members.

Syntax:

x+y

x-y

x*y

x/y

Note:

If both the bottom rank operations (addition and subtraction) and the next rank up operations (multiplication and division) appear in the same formula, the multiplication and division take precedence over the addition and subtraction.

 

In the cases where there is parentheses or brackets, work problems from the inside out. When having a bunch of operations of the same rank, you just operate from left to right.

Parameter:

x

A number

y

A number

Return value:

Number

Example:

 

A

 

1

=2+5

7

2

=2-5

-3

3

=2*5

10

4

=10/5

2,0

5

=2+3.5*30

107,0

Related function:

cmp()