Multiply the value of the specified lhs object by the value of the specified rhs as described by IEEE‐754 and return the result.
Synopsis
Declared in <bdldfp_decimalimputil.h>
static
DecimalImpUtil::ValueType32
multiply(
ValueType32 lhs,
ValueType32 rhs);
Description
* If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN. * Otherwise if either of lhs or rhs is NaN, return a NaN. * Otherwise if one of the operands is infinity (positive or negative) and the other is zero (positive or negative), then store the value of the macro EDOM into errno and return a NaN. * Otherwise if both lhs and rhs are infinity (positive or negative), return infinity. The sign of the returned value will be positive if lhs and rhs have the same sign, and negative otherwise. * Otherwise, if either lhs or rhs is zero, return zero. The sign of the returned value will be positive if lhs and rhs have the same sign, and negative otherwise. * Otherwise if the product of lhs and rhs has an absolute value that is larger than the maximum value of the indicated result type then store the value of the macro ERANGE into errno and return infinity with the same sign as that result. * Otherwise if the product of lhs and rhs has an absolute value that is smaller than min value of the indicated result type then store the value of the macro ERANGE into errno and return zero with the same sign as that result. * Otherwise return the product of the value of rhs and the number represented by rhs. Return the product of the specified decimal values.
Created with MrDocs