The decmul() function
The decmul() function multiplies two decimal type values.
Syntax
mint decmul(n1, n2, product)
dec_t *n1;
dec_t *n2;
dec_t *product;
- n1
- A pointer to the decimal structure of the first operand.
- n2
- A pointer to the decimal structure of the second operand.
- product
- A pointer to a decimal structure to contain the product of n1 times n2.
Usage
The product value can be the same as the value of either n1 or n2.
Return values
- 0
- The operation was successful.
- -1200
- The operation resulted in overflow.
- -1201
- The operation resulted in underflow.