decdiv()

Divides one decimal value by another.

Syntax

mint decdiv(dec_t *n1, struct decimal *n2, struct decimal *n3);
  1. n1 is a pointer to the decimal structure of the number to be divided.
  2. n2 is a pointer to the decimal structure of the number that is the divisor.
  3. n3 is a pointer to the decimal structure that contains the quotient of ( n1 divided by n2 ).

Returns

Table 1. Return codes
Code Description
0 The operation was successful.
-1200 The operation resulted in overflow.
-1201 The operation resulted in underflow.
-1202 The operation attempted to divide by zero.