[#BloombergLP-bdldfp-operator_slash-023b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::operator/ :relfileprefix: ../../ :mrdocs: Divide the value of the specified `lhs` by the value of the specified `rhs` as described by IEEE‐754, and return the result. == Synopsis Declared in `<bdldfp_decimal.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdldfp/Decimal128.adoc[bdldfp::Decimal128] operator/( xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] lhs, xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] 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 `lhs` and `rhs` are both infinity (positive or negative) or both zero (positive or negative) then store the value of the macro `EDOM` into `errno` and return a NaN. * Otherwise if `lhs` has a normal value and `rhs` has a positive zero value, store the value of the macro `ERANGE` into `errno` and return infinity with the sign of `lhs`. * Otherwise if `lhs` has a normal value and `rhs` has a negative zero value, store the value of the macro `ERANGE` into `errno` and return infinity with the opposite sign as `lhs`. * Otherwise if `lhs` has infinity value and `rhs` has a positive zero value, return infinity with the sign of `lhs`. * Otherwise if `lhs` has infinity value and `rhs` has a negative zero value, return infinity with the opposite sign as `lhs`. * Otherwise if dividing the value of `lhs` by the value of `rhs` results in an absolute value that is larger than `std::numeric_limits<Decimal128>::max()` then store the value of the macro `ERANGE` into `errno` and return infinity with the same sign as that result. * Otherwise if dividing the value of `lhs` by the value of `rhs` results in an absolute value that is smaller than `std::numeric_limits<Decimal128>::min()` then store the value of the macro `ERANGE` into `errno` and return zero with the same sign as that result. * Otherwise return the result of dividing the value of `lhs` by the value of `rhs`. [.small]#Created with https://www.mrdocs.com[MrDocs]#