VALUE1
/
VALUE2

The / operator divides one numeric value by another.


Parameters

This operator has two parameters:

value1 – The first numeric value.

value2 – The second numeric value.


Description

This operator performs division just like you learned in grade school. The result is always a floating point number, even if the answer could be expressed as an integer.

20/5 ☞ 4.0000
21/5 ☞ 4.20000
21.6/6.25 ☞ 3.4560

You can use the ÷ symbol for division instead of the / symbol.

20 ÷ 5 ☞ 4.0000
21 ÷ 5 ☞ 4.20000
21.6 ÷ 6.25 ☞ 3.4560

Dividing by Zero

If you divide any number by 0, the result is infinity:

3/0 ☞ inf

It’s numerically incorrect, but if you would prefer that the result of dividing by zero be zero then use the divzero( function:

divzero(3/0) ☞ 0.0000

You can also use the divzeroerror( function if you would prefer that an error be generated.


See Also


History

VersionStatusNotes
10.0UpdatedThe / operator has two major changes from earlier versions of Panorama: 1) Division is always performed in floating point even if all operands are integers, and 2) The result of dividing by zero is infinity instead of an error message.