[#BloombergLP-bdldfp-DecimalImpUtil_IntelDfp-multiply-06] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalImpUtil_IntelDfp.adoc[DecimalImpUtil_IntelDfp]::multiply :relfileprefix: ../../../ :mrdocs: 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_inteldfp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bdldfp/DecimalImpUtil_IntelDfp/ValueType32.adoc[DecimalImpUtil_IntelDfp::ValueType32] multiply( xref:BloombergLP/bdldfp/DecimalImpUtil_IntelDfp/ValueType32.adoc[ValueType32] lhs, xref:BloombergLP/bdldfp/DecimalImpUtil_IntelDfp/ValueType32.adoc[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 max 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`. [.small]#Created with https://www.mrdocs.com[MrDocs]#