Index
Arithmetic

div

<-a <-b div ->result

Description

Divides the two arguments together and pushes the result on the stack. the output type (integer or float) depends on the input, except is the result is explicitly cast. See examples.

Examples

trace(5 4 div) #prints '1'. Both arguments are integers so division is integer division
trace(5 4.0 div) #prints '1.2'. Handled as floating point division
trace(5 asfloat(4) div) #prints '1.2'. Handled as floating point division

Index