The DIV function divides one number by another and returns the result, including the remainder in a user specified precision. The divide symbol (/) can also be used for division and is the recommended operator unless level of precision must be specified.
Category
Mathematical
Syntax
DIV(dividend, divisior, scale)
or
dividend/divisor
Parameters and Descriptions
Parameter | Description |
---|---|
dividend | This parameter specifies the number that is to be divided. |
divisor | This parameter specifies the number that will be used to divide the source number (dividend). |
scale | Specifies the precision (the number of digits right of the decimal point) to be returned with the result of the divide operation. |
Example 1
Divide INPUT_NUM1 (30) by INPUT_NUM2 (8) and return the result with a precision of 2. Map the result to target field RESULT.
RESULT = Input_Num1 / Input_Num2
Returns the value of 3.75 and maps the result to the target field.
Example 2
Divide 25 by 8 and return the result with a precision of 3 and map the result to target field RESULT.
RESULT = DIV (25,8,3)
Returns the value of 3.125 and maps the result to the target field.