Quick Links: |
typedef Decimal_Type32 bdldfp::Decimal32 |
typedef Decimal_Type64 bdldfp::Decimal64 |
typedef Decimal_Type128 bdldfp::Decimal128 |
Decimal32 bdldfp::operator+ | ( | Decimal32 | value | ) |
Return a copy of the specified value
if the value is not negative zero, and return positive zero otherwise.
Decimal32 bdldfp::operator- | ( | Decimal32 | value | ) |
Return the result of applying the unary - operator to the specified value
as described by IEEE-754, essentially reversing the sign bit. Note that floating-point numbers have signed zero, so this operation is not the same as 0 - value
.
Decimal32 bdldfp::operator++ | ( | Decimal32 & | value, | |
int | ||||
) |
Apply the prefix ++ operator to the specified value
and return its original value. Note that this is a floating-point value so this operation may not change the value of this object at all (if the value is large) or it may just set it to 1.0 (if the original value is small).
Decimal32 bdldfp::operator-- | ( | Decimal32 & | value, | |
int | ||||
) |
Apply the prefix -- operator to the specified value
and return its original value. Note that this is a floating-point value so this operation may not change the value of this object at all (if the value is large) or it may just set it to -1.0 (if the original value is small).
Decimal32 bdldfp::operator+ | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Add the value of the specified rhs
to the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. lhs
and rhs
are infinities of differing signs, store the value of the macro EDOM
into errno
and return a NaN. lhs
and rhs
are infinities of the same sign then return infinity of that sign. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and set this object to infinity with the same sign as that result. lhs
and the number represented by rhs
. Decimal32 bdldfp::operator+ | ( | Decimal32 | lhs, | |
int | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | Decimal32 | lhs, | |
unsigned int | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | Decimal32 | lhs, | |
long | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | Decimal32 | lhs, | |
unsigned long | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | Decimal32 | lhs, | |
long long | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | Decimal32 | lhs, | |
unsigned long long | rhs | |||
) |
Add the specified rhs
to the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
object is NaN, then return a NaN. lhs
is infinity, then return infinity. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
and the number represented by lhs
. Decimal32 bdldfp::operator+ | ( | int | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | unsigned int | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | unsigned long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | long long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator+ | ( | unsigned long long | lhs, | |
Decimal32 | rhs | |||
) |
Add the specified lhs
to the value of the specified rhs
as described by IEEE-754 and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
object is NaN, then return a NaN. rhs
is infinity, then return infinity. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
and the number represented by rhs
. Decimal32 bdldfp::operator- | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Subtract the value of the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. lhs
and the rhs
have infinity values of the same sign, store the value of the macro EDOM
into errno
and return a NaN. lhs
and the rhs
have infinity values of differing signs, then return lhs
. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
from the value of lhs
. Decimal32 bdldfp::operator- | ( | Decimal32 | lhs, | |
int | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | Decimal32 | lhs, | |
unsigned int | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | Decimal32 | lhs, | |
long | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | Decimal32 | lhs, | |
unsigned long | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | Decimal32 | lhs, | |
long long | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | Decimal32 | lhs, | |
unsigned long long | rhs | |||
) |
Subtract the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return a reference to this object.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN, then return a NaN. lhs
is infinity, then return infinity. rhs
from lhs
object's value results in an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
from the value of lhs
. Decimal32 bdldfp::operator- | ( | int | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | unsigned int | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | unsigned long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | long long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator- | ( | unsigned long long | lhs, | |
Decimal32 | rhs | |||
) |
Subtract the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return a reference to this object.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN, then return a NaN. rhs
is infinity, then return infinity. rhs
from lhs
object's value results in an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
from the number lhs
. Decimal32 bdldfp::operator* | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Multiply the value of the specified lhs
object by the value of the specified rhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. EDOM
into errno
and return a NaN. 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. 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. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
and rhs
has an absolute value that is smaller than std::numeric_limits<Decimal32>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. rhs
and the number represented by rhs
. Decimal32 bdldfp::operator* | ( | Decimal32 | lhs, | |
int | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | Decimal32 | lhs, | |
unsigned int | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | Decimal32 | lhs, | |
long | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | Decimal32 | lhs, | |
unsigned long | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | Decimal32 | lhs, | |
long long | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | Decimal32 | lhs, | |
unsigned long long | rhs | |||
) |
Multiply the specified rhs
by the value of the specified lhs
as described by IEEE-754, and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN, then return a NaN. lhs
is infinity (positive or negative), and rhs
is zero, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is infinity (positive or negative), then return lhs
. rhs
is zero, then return zero with the sign of lhs
. rhs
and the value of lhs
results in an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
and the value of lhs
results in an absolute value that is smaller than std::numeric_limits<Decimal32>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
and value rhs
. Decimal32 bdldfp::operator* | ( | int | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | unsigned int | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | unsigned long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | long long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator* | ( | unsigned long long | lhs, | |
Decimal32 | rhs | |||
) |
Multiply the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN, then return a NaN. rhs
is infinity (positive or negative), and lhs
is zero, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is infinity (positive or negative), then return rhs
. lhs
is zero, then return zero with the sign of rhs
. lhs
and the value of rhs
results in an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
and the value of rhs
results in an absolute value that is smaller than std::numeric_limits<Decimal32>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
and value rhs
. Decimal32 bdldfp::operator/ | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Divide the value of the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. 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. 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
. 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
. lhs
has infinity value and rhs
has a positive zero value, return infinity with the sign of lhs
. lhs
has infinity value and rhs
has a negative zero value, return infinity with the opposite sign as lhs
. lhs
by the value of rhs
results in an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
by the value of rhs
results in an absolute value that is smaller than std::numeric_limits<Decimal32>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
by the value of rhs
. Decimal32 bdldfp::operator/ | ( | Decimal32 | lhs, | |
int | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | Decimal32 | lhs, | |
unsigned int | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | Decimal32 | lhs, | |
long | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | Decimal32 | lhs, | |
unsigned long | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | Decimal32 | lhs, | |
long long | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | Decimal32 | lhs, | |
unsigned long long | rhs | |||
) |
Divide the value of the specified lhs
by the specified rhs
as described by IEEE-754, and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN then return a NaN. lhs
is infinity (positive or negative) and rhs
is positive value then return infinity value with the same sign as its original value. lhs
is infinity (positive or negative) and rhs
is negative value then return infinity value with the opposite sign as its original value. rhs
is zero, store the value of the macro ERANGE
into errno
and return infinity with the same sign it had prior to this operation. lhs
by the value of rhs
results in an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
by the value of rhs
results in an absolute value that is smaller than std::numeric_limits<Decimal32>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
by the value rhs
. Decimal32 bdldfp::operator/ | ( | int | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | unsigned int | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | unsigned long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | long long | lhs, | |
Decimal32 | rhs | |||
) |
Decimal32 bdldfp::operator/ | ( | unsigned long long | lhs, | |
Decimal32 | rhs | |||
) |
Divide the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN then return a NaN. rhs
is infinity (positive or negative), and lhs
is zero, store the value of the macro ERANGE
into errno
and return a NaN. rhs
is zero (positive or negative), store the value of the macro ERANGE
into errno
and return infinity with the sign of lhs
. lhs
by the value of rhs
results in an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
by the value of rhs
results in an absolute value that is smaller than std::numeric_limits<Decimal32>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
by the value rhs
. Note that this is a floating-point operation, not integer. bool bdldfp::operator== | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
and rhs
have the same value, and false
otherwise. Two Decimal32
objects have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two Decimal32
objects have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
Note that a NaN is never equal to anything, including itself:
Decimal32 aNaN = std::numeric_limits<Decimal32>::quiet_NaN(); assert(!(aNan == aNan));
bool bdldfp::operator!= | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
and rhs
do not have the same value, and false
otherwise. Two Decimal32
objects do not have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two Decimal32
objects do not have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
Note that a NaN is never equal to anything, including itself:
Decimal32 aNaN = std::numeric_limits<Decimal32>::quiet_NaN(); assert(aNan != aNan);
bool bdldfp::operator< | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
has a value less than the specified rhs
and false
otherwise. The value of a Decimal32
object lhs
is less than that of an object rhs
if the compareQuietLess
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less than of that of rhs
. In other words, lhs
is less than rhs
if:
lhs
nor rhs
are NaN, or lhs
is zero (positive or negative) and rhs
positive, or rhs
is zero (positive or negative) and lhs
negative, or lhs
is not positive infinity, or lhs
is negative infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is less than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator<= | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
has a value less than or equal the value of the specified rhs
and false
otherwise. The value of a Decimal32
object lhs
is less than or equal to the value of an object rhs
if the compareQuietLessEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less or equal to that of rhs
. In other words, lhs
is less or equal than rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are positive infinity, or lhs
is negative infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is less or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator> | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
has a greater value than the specified rhs
and false
otherwise. The value of a Decimal32
object lhs
is greater than that of an object rhs
if the compareQuietGreater
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be greater than of that of rhs
. In other words, lhs
is greater than 'rhs'if:
lhs
nor rhs
are NaN, or lhs
and rhs
are not both zero (positive or negative), or lhs
is not negative infinity, or lhs
is positive infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is greater than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator>= | ( | Decimal32 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
has a value greater than or equal to the value of the specified rhs
and false
otherwise. The value of a Decimal32
object lhs
is greater or equal to a Decimal32
object rhs
if the compareQuietGreaterEqual
operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs
to be greater or equal to that of rhs
. In other words, lhs
is greater than or equal to rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are negative infinity, or lhs
is positive infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is greater or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bsl::basic_istream<CHARTYPE, TRAITS>& bdldfp::operator>> | ( | bsl::basic_istream< CHARTYPE, TRAITS > & | stream, | |
Decimal32 & | object | |||
) |
Read, into the specified object
, from the specified input stream
an IEEE 32 bit decimal floating-point value as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences) and return a reference providing modifiable access to stream
. If stream
contains a NaN value, it is unspecified if object
will receive a quiet or signaling Nan
. If stream
is not valid on entry stream.good() == false
, this operation has no effect other than setting stream.fail()
to true
. If eof (end-of-file) is found before any non-whitespace characters stream.fail()
is set to true
and object
remains unchanged. If eof is detected after some characters have been read (and successfully interpreted as part of the textual representation of a floating-point value as specified by IEEE-754) then stream.eof()
is set to true. If the first non-whitespace character sequence is not a valid textual representation of a floating-point value (e.g., 12e or e12 or 1*2) the stream.fail()
is set to true and object
will remain unchanged. If a real number value is represented by the character sequence but it is a large positive or negative value that cannot be stored into object
then store the value of the macro ERANGE
into errno
and positive or negative infinity is stored into object
, respectively. If a real number value is represented by the character sequence but it is a small positive or negative value that cannot be stored into object
then store the value of the macro ERANGE
into errno
and positive or negative zero is stored into object
, respectively. If a real number value is represented by the character sequence but it cannot be stored exactly into object
, the value is rounded according to the current rounding direction (of the environment) and then stored into object
.
NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.
bsl::basic_ostream<CHARTYPE, TRAITS>& bdldfp::operator<< | ( | bsl::basic_ostream< CHARTYPE, TRAITS > & | stream, | |
Decimal32 | object | |||
) |
Write the value of the specified object
to the specified output stream
in a single line format as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences), and return a reference providing modifiable access to stream
. If stream
is not valid on entry, this operation has no effect.
NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.
void bdldfp::hashAppend | ( | HASHALG & | hashAlg, | |
const Decimal32 & | object | |||
) |
Pass the specified object
to the specified hashAlg
. This function integrates with the bslh
modular hashing system and effectively provides a bsl::hash
specialization for Decimal32
. Note that two objects which have the same value but different representations will hash to the same value.
Decimal64 bdldfp::operator+ | ( | Decimal64 | value | ) |
Return a copy of the specified value
.
Decimal64 bdldfp::operator- | ( | Decimal64 | value | ) |
Return the result of applying the unary - operator to the specified value
as described by IEEE-754. Note that floating-point numbers have signed zero, therefore this operation is not the same as 0-value
.
Decimal64 bdldfp::operator++ | ( | Decimal64 & | value, | |
int | ||||
) |
Apply the prefix ++ operator to the specified value
and return its original value. Note that this is a floating-point value so this operations may not change the value of this object at all (if the value is large) or it may just set it to 1.0 (if the original value is small).
Decimal64 bdldfp::operator-- | ( | Decimal64 & | value, | |
int | ||||
) |
Apply the prefix -- operator to the specified value
and return its original value. Note that this is a floating-point value so this operations may not change the value of this object at all (if the value is large) or it may just set it to -1.0 (if the original value is small).
Decimal64 bdldfp::operator+ | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Add the value of the specified rhs
to the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. lhs
and rhs
are infinities of differing signs, store the value of the macro EDOM
into errno
and return a NaN. lhs
and rhs
are infinities of the same sign then return infinity of that sign. rhs
is zero (positive or negative), return lhs
. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and set this object to infinity with the same sign as that result. lhs
and the number represented by rhs
. Decimal64 bdldfp::operator+ | ( | Decimal64 | lhs, | |
int | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | Decimal64 | lhs, | |
unsigned int | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | Decimal64 | lhs, | |
long | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | Decimal64 | lhs, | |
unsigned long | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | Decimal64 | lhs, | |
long long | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | Decimal64 | lhs, | |
unsigned long long | rhs | |||
) |
Add the specified rhs
to the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
object is NaN, then return a NaN. lhs
is infinity, then return infinity. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
and the number represented by lhs
. Decimal64 bdldfp::operator+ | ( | int | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | unsigned int | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | unsigned long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | long long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator+ | ( | unsigned long long | lhs, | |
Decimal64 | rhs | |||
) |
Add the specified lhs
to the value of the specified rhs
as described by IEEE-754 and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
object is NaN, then return a NaN. rhs
is infinity, then return infinity. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
and the number represented by rhs
. Decimal64 bdldfp::operator- | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Subtract the value of the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. lhs
and the rhs
have infinity values of the same sign, store the value of the macro EDOM
into errno
and return a NaN. lhs
and the rhs
have infinity values of differing signs, then return lhs
. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
. Decimal64 bdldfp::operator- | ( | Decimal64 | lhs, | |
int | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | Decimal64 | lhs, | |
unsigned int | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | Decimal64 | lhs, | |
long | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | Decimal64 | lhs, | |
unsigned long | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | Decimal64 | lhs, | |
long long | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | Decimal64 | lhs, | |
unsigned long long | rhs | |||
) |
Subtract the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return a reference to this object.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN, then return a NaN. lhs
is infinity, then return infinity. rhs
from lhs
object's value results in an absolute value that is larger than std::numeric_limits<Decimal32>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
from the value of lhs
. Decimal64 bdldfp::operator- | ( | int | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | unsigned int | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | unsigned long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | long long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator- | ( | unsigned long long | lhs, | |
Decimal64 | rhs | |||
) |
Subtract the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return a reference to this object.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN, then return a NaN. rhs
is infinity, then return infinity. rhs
from lhs
object's value results in an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
from the number lhs
. Decimal64 bdldfp::operator* | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Multiply the value of the specified lhs
object by the value of the specified rhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. EDOM
into errno
and return a NaN. 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. 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. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return an infinity with the same sign as that result. lhs
and rhs
has an absolute value that is smaller than std::numeric_limits<Decimal64>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. rhs
and the number represented by rhs
. Decimal64 bdldfp::operator* | ( | Decimal64 | lhs, | |
int | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | Decimal64 | lhs, | |
unsigned int | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | Decimal64 | lhs, | |
long | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | Decimal64 | lhs, | |
unsigned long | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | Decimal64 | lhs, | |
long long | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | Decimal64 | lhs, | |
unsigned long long | rhs | |||
) |
Multiply the specified rhs
by the value of the specified lhs
as described by IEEE-754, and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN, then return a NaN. lhs
is infinity (positive or negative), and rhs
is zero, then store the value of the macro EDOM
into'errno' and return a NaN. lhs
is infinity (positive or negative), then return lhs
. rhs
is zero, then return zero with the sign of lhs
. rhs
and the value of lhs
results in an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. rhs
and the value of lhs
results in an absolute value that is smaller than std::numeric_limits<Decimal64>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
and value rhs
. Decimal64 bdldfp::operator* | ( | int | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | unsigned int | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | unsigned long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | long long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator* | ( | unsigned long long | lhs, | |
Decimal64 | rhs | |||
) |
Multiply the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN, then return a NaN. rhs
is infinity (positive or negative), and lhs
is zero, then store the value of the macro EDOM
into'errno' and return a NaN. rhs
is infinity (positive or negative), then return rhs
. lhs
is zero, then return zero with the sign of rhs
. lhs
and the value of rhs
results in an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
and the value of rhs
results in an absolute value that is smaller than std::numeric_limits<Decimal64>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
and value rhs
. Decimal64 bdldfp::operator/ | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Divide the value of the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. 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. 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
. 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
. lhs
has infinity value and rhs
has a positive zero value, return infinity with the sign of lhs
. lhs
has infinity value and rhs
has a negative zero value, return infinity with the opposite sign as lhs
. lhs
by the value of rhs
results in an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
by the value of rhs
results in an absolute value that is smaller than std::numeric_limits<Decimal64>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
by the value of rhs
. Decimal64 bdldfp::operator/ | ( | Decimal64 | lhs, | |
int | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | Decimal64 | lhs, | |
unsigned int | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | Decimal64 | lhs, | |
long | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | Decimal64 | lhs, | |
unsigned long | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | Decimal64 | lhs, | |
long long | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | Decimal64 | lhs, | |
unsigned long long | rhs | |||
) |
Divide the value of the specified lhs
by the specified rhs
as described by IEEE-754, and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN then return a NaN. lhs
is infinity (positive or negative) and rhs
is positive value then return infinity value with the same sign as its original value. lhs
is infinity (positive or negative) and rhs
is negative value then return infinity value with the opposite sign as its original value. rhs
is zero, store the value of the macro ERANGE
into errno
and return infinity with the same sign it had prior to this operation. lhs
by the value of rhs
results in an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
by the value of rhs
results in an absolute value that is smaller than std::numeric_limits<Decimal64>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
by the value rhs
. Decimal64 bdldfp::operator/ | ( | int | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | unsigned int | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | unsigned long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | long long | lhs, | |
Decimal64 | rhs | |||
) |
Decimal64 bdldfp::operator/ | ( | unsigned long long | lhs, | |
Decimal64 | rhs | |||
) |
Divide the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN then return a NaN. rhs
is infinity (positive or negative), and lhs
is zero, store the value of the macro ERANGE
into errno
and return a NaN. rhs
is zero (positive or negative), store the value of the macro ERANGE
into errno
and return infinity with the sign of lhs
. lhs
by the value of rhs
results in an absolute value that is larger than std::numeric_limits<Decimal64>max()
then store the value of the macro ERANGE
into errno
and return infinity with the same sign as that result. lhs
by the value of rhs
results in an absolute value that is smaller than std::numeric_limits<Decimal64>min()
then store the value of the macro ERANGE
into errno
and return zero with the same sign as that result. lhs
by the value of rhs
. Note that this is a floating-point operation, not integer. bool bdldfp::operator== | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
and rhs
have the same value, and false
otherwise. Two Decimal64
objects have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two Decimal64
objects have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
Note that a NaN is never equal to anything, including itself:
Decimal64 aNaN = std::numeric_limits<Decimal64>::quiet_NaN(); assert(!(aNan == aNan));
bool bdldfp::operator== | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
bool bdldfp::operator== | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
and rhs
have the same value, and false
otherwise. Two decimal objects have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two decimal objects have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator!= | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
and rhs
do not have the same value, and false
otherwise. Two Decimal64
objects do not have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two Decimal64
objects do not have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
Note that a NaN is never equal to anything, including itself:
Decimal64 aNaN = std::numeric_limits<Decimal64>::quiet_NaN(); assert(aNan != aNan);
bool bdldfp::operator!= | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
bool bdldfp::operator!= | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
and rhs
do not have the same value, and false
otherwise. Two decimal objects do not have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two decimal objects do not have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator< | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
has a value less than the specified rhs
and false
otherwise. The value of a Decimal64
object lhs
is less than that of an object rhs
if the compareQuietLess
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less than of that of rhs
. In other words, lhs
is less than rhs
if:
lhs
nor rhs
are NaN, or lhs
is zero (positive or negative) and rhs
is positive, or rhs
is zero (positive or negative) and lhs
negative, or lhs
is not positive infinity, or lhs
is negative infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is less than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator< | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
bool bdldfp::operator< | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
has a value less than the specified rhs
and false
otherwise. The value of a decimal object lhs
is less than that of an object rhs
if the compareQuietLess
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less than of that of rhs
. In other words, lhs
is less than rhs
if:
lhs
nor rhs
are NaN, or lhs
is zero (positive or negative) and rhs
is positive, or rhs
is zero (positive or negative) and lhs
negative, or lhs
is not positive infinity, or lhs
is negative infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is less than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator<= | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
has a value less than or equal the value of the specified rhs
and false
otherwise. The value of a Decimal64
object lhs
is less than or equal to the value of an object rhs
if the compareQuietLessEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less or equal to that of rhs
. In other words, lhs
is less or equal than rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are positive infinity, or lhs
is negative infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is less or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator<= | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
bool bdldfp::operator<= | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
has a value less than or equal the value of the specified rhs
and false
otherwise. The value of a decimal object lhs
is less than or equal to the value of an object rhs
if the compareQuietLessEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less or equal to that of rhs
. In other words, lhs
is less or equal than rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are positive infinity, or lhs
is negative infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is less or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator> | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
has a greater value than the specified rhs
and false
otherwise. The value of a Decimal64
object lhs
is greater than that of an object rhs
if the compareQuietGreater
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be greater than of that of rhs
. In other words, lhs
is greater than rhs
if:
lhs
nor rhs
are NaN, or rhs
is zero (positive or negative) and lhs
positive, or lhs
is zero (positive or negative) and rhs
negative, or lhs
is not negative infinity, or lhs
is positive infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is greater than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator> | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
bool bdldfp::operator> | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
has a greater value than the specified rhs
and false
otherwise. The value of a decimal object lhs
is greater than that of an object rhs
if the compareQuietGreater
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be greater than of that of rhs
. In other words, lhs
is greater than rhs
if:
lhs
nor rhs
are NaN, or rhs
is zero (positive or negative) and lhs
positive, or lhs
is zero (positive or negative) and rhs
negative, or lhs
is not negative infinity, or lhs
is positive infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is greater than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator>= | ( | Decimal64 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
has a value greater than or equal to the value of the specified rhs
and false
otherwise. The value of a Decimal64
object lhs
is greater or equal to a Decimal64
object rhs
if the compareQuietGreaterEqual
operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs
to be greater or equal to that of rhs
. In other words, lhs
is greater than or equal to rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are negative infinity, or lhs
is positive infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is greater or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator>= | ( | Decimal32 | lhs, | |
Decimal64 | rhs | |||
) |
bool bdldfp::operator>= | ( | Decimal64 | lhs, | |
Decimal32 | rhs | |||
) |
Return true
if the specified lhs
has a value greater than or equal to the value of the specified rhs
and false
otherwise. The value of a decimal object lhs
is greater or equal to a decimal object rhs
if the compareQuietGreaterEqual
operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs
to be greater or equal to that of rhs
. In other words, lhs
is greater than or equal to rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are negative infinity, or lhs
is positive infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is greater or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bsl::basic_istream<CHARTYPE, TRAITS>& bdldfp::operator>> | ( | bsl::basic_istream< CHARTYPE, TRAITS > & | stream, | |
Decimal64 & | object | |||
) |
Read, into the specified object
, from the specified input stream
an IEEE 64 bit decimal floating-point value as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences) and return a reference providing modifiable access to stream
. If stream
contains a Nan value, it is unspecified if object
will receive a quiet or signaling Nan
. If stream
is not valid on entry stream.good() == false
, this operation has no effect other than setting stream.fail()
to true
. If eof (end-of-file) is found before any non-whitespace characters stream.fail()
is set to true
and object
remains unchanged. If eof is detected after some characters have been read (and successfully interpreted as part of the textual representation of a floating-point value as specified by IEEE-754) then stream.eof()
is set to true. If the first non-whitespace character sequence is not a valid textual representation of a floating-point value (e.g., 12e or e12 or 1*2) the stream.fail()
is set to true and object
will remain unchanged. If a real number value is represented by the character sequence but it is a large positive or negative value that cannot be stored into object
then store the value of the macro ERANGE
into errno
and positive or negative infinity is stored into object
, respectively. If a real number value is represented by the character sequence but it is a small positive or negative value that cannot be stored into object
then store the value of the macro ERANGE
into errno
and positive or negative zero is stored into object
, respectively. If a real number value is represented by the character sequence but it cannot be stored exactly into object
, the value is rounded according to the current rounding direction (of the environment) and then stored into object
.
NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.
bsl::basic_ostream<CHARTYPE, TRAITS>& bdldfp::operator<< | ( | bsl::basic_ostream< CHARTYPE, TRAITS > & | stream, | |
Decimal64 | object | |||
) |
Write the value of the specified object
to the specified output stream
in a single line format as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences), and return a reference providing modifiable access to stream
. If stream
is not valid on entry, this operation has no effect.
NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.
void bdldfp::hashAppend | ( | HASHALG & | hashAlg, | |
const Decimal64 & | object | |||
) |
Pass the specified object
to the specified hashAlg
. This function integrates with the bslh
modular hashing system and effectively provides a bsl::hash
specialization for Decimal64
. Note that two objects which have the same value but different representations will hash to the same value.
Decimal128 bdldfp::operator+ | ( | Decimal128 | value | ) |
Return a copy of the specified value
if the value is not negative zero, and return positive zero otherwise.
Decimal128 bdldfp::operator- | ( | Decimal128 | value | ) |
Return the result of applying the unary - operator to the specified value
as described by IEEE-754. Note that floating-point numbers have signed zero, therefore this operation is not the same as 0-value
.
Decimal128 bdldfp::operator++ | ( | Decimal128 & | value, | |
int | ||||
) |
Apply the prefix ++ operator to the specified value
and return its original value. Note that this is a floating-point value so this operations may not change the value of this object at all (if the value is large) or it may just set it to 1.0 (if the original value is small).
Decimal128 bdldfp::operator-- | ( | Decimal128 & | value, | |
int | ||||
) |
Apply the prefix -- operator to the specified value
and return its original value. Note that this is a floating-point value so this operations may not change the value of this object at all (if the value is large) or it may just set it to -1.0 (if the original value is small).
Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Add the value of the specified rhs
to the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. lhs
and rhs
are infinities of differing signs, store the value of the macro EDOM
into errno
and return a NaN. lhs
and rhs
are infinities of the same sign then return infinity of that sign. rhs
is zero (positive or negative), return lhs
. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal128>max()
then store the value of the macro ERANGE
into errno
and set this object to infinity with the same sign as that result. lhs
and the number represented by rhs
. Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
int | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
unsigned int | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
long | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
unsigned long | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
long long | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | Decimal128 | lhs, | |
unsigned long long | rhs | |||
) |
Add the specified rhs
to the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
object is NaN, then return a NaN. lhs
is infinity, then return infinity. lhs
and rhs
has 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. rhs
and the number represented by lhs
. Decimal128 bdldfp::operator+ | ( | int | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | unsigned int | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | unsigned long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | long long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator+ | ( | unsigned long long | lhs, | |
Decimal128 | rhs | |||
) |
Add the specified lhs
to the value of the specified rhs
as described by IEEE-754 and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
object is NaN, then return a NaN. rhs
is infinity, then return infinity. lhs
and rhs
has 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. lhs
and the number represented by rhs
. Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Subtract the value of the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. lhs
and the rhs
have infinity values of the same sign, store the value of the macro EDOM
into errno
and return a NaN. lhs
and the rhs
have infinity values of differing signs, then return lhs
. lhs
and rhs
has 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. lhs
. Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
int | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
unsigned int | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
long | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
unsigned long | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
long long | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | Decimal128 | lhs, | |
unsigned long long | rhs | |||
) |
Subtract the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return a reference to this object.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN, then return a NaN. lhs
is infinity, then return infinity. rhs
from lhs
object's value 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. rhs
from the value of lhs
. Decimal128 bdldfp::operator- | ( | int | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | unsigned int | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | unsigned long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | long long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator- | ( | unsigned long long | lhs, | |
Decimal128 | rhs | |||
) |
Subtract the specified rhs
from the value of the specified lhs
as described by IEEE-754 and return a reference to this object.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN, then return a NaN. rhs
is infinity, then return infinity. rhs
from lhs
object's value 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. rhs
from the number lhs
. Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Multiply the value of the specified lhs
object by the value of the specified rhs
as described by IEEE-754 and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. EDOM
into errno
and return a NaN. 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. 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. lhs
and rhs
has an absolute value that is larger than std::numeric_limits<Decimal128>max()
then store the value of the macro ERANGE
into errno
and return an infinity with the same sign as that result. lhs
and rhs
has 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. rhs
and the number represented by rhs
. Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
int | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
unsigned int | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
long | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
unsigned long | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
long long | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | Decimal128 | lhs, | |
unsigned long long | rhs | |||
) |
Multiply the specified rhs
by the value of the specified lhs
as described by IEEE-754, and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN, then return a NaN. lhs
is infinity (positive or negative), and rhs
is zero, then store the value of the macro EDOM
into'errno' and return a NaN. lhs
is infinity (positive or negative), then return lhs
. rhs
is zero, then return zero with the sign of lhs
. rhs
and the value of lhs
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. rhs
and the value of lhs
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. lhs
and value rhs
. Decimal128 bdldfp::operator* | ( | int | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | unsigned int | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | unsigned long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | long long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator* | ( | unsigned long long | lhs, | |
Decimal128 | rhs | |||
) |
Multiply the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN, then return a NaN. rhs
is infinity (positive or negative), and lhs
is zero, then store the value of the macro EDOM
into'errno' and return a NaN. rhs
is infinity (positive or negative), then return rhs
. lhs
is zero, then return zero with the sign of rhs
. lhs
and 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. lhs
and 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. lhs
and value rhs
. Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Divide the value of the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
lhs
or rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
or rhs
is NaN, return a NaN. 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. 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
. 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
. lhs
has infinity value and rhs
has a positive zero value, return infinity with the sign of lhs
. lhs
has infinity value and rhs
has a negative zero value, return infinity with the opposite sign as lhs
. 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. 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. lhs
by the value of rhs
. Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
int | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
unsigned int | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
long | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
unsigned long | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
long long | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | Decimal128 | lhs, | |
unsigned long long | rhs | |||
) |
Divide the value of the specified lhs
by the specified rhs
as described by IEEE-754, and return the result.
lhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. lhs
is NaN then return a NaN. lhs
is infinity (positive or negative) and rhs
is positive value then return infinity value with the same sign as its original value. lhs
is infinity (positive or negative) and rhs
is negative value then return infinity value with the opposite sign as its original value. rhs
is zero, store the value of the macro ERANGE
into errno
and return infinity with the same sign it had prior to this operation. 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. 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. lhs
by the value of rhs
. Decimal128 bdldfp::operator/ | ( | int | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | unsigned int | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | unsigned long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | long long | lhs, | |
Decimal128 | rhs | |||
) |
Decimal128 bdldfp::operator/ | ( | unsigned long long | lhs, | |
Decimal128 | rhs | |||
) |
Divide the specified lhs
by the value of the specified rhs
as described by IEEE-754, and return the result.
rhs
is signaling NaN, then store the value of the macro EDOM
into errno
and return a NaN. rhs
is NaN then return a NaN. rhs
is infinity (positive or negative), and lhs
is zero, store the value of the macro ERANGE
into errno
and return a NaN. rhs
is zero (positive or negative), store the value of the macro ERANGE
into errno
and return infinity with the sign of lhs
. 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. 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. lhs
by the value of rhs
. Note that this is a floating-point operation, not integer. bool bdldfp::operator== | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Return true
if the specified lhs
and rhs
have the same value, and false
otherwise. Two Decimal128
objects have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two Decimal128
objects have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
Note that a NaN is never equal to anything, including itself:
Decimal128 aNaN = std::numeric_limits<Decimal128>::quiet_NaN(); assert(!(aNan == aNan));
bool bdldfp::operator== | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator== | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
bool bdldfp::operator== | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator== | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
and rhs
have the same value, and false
otherwise. Two decimal objects have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two decimal objects have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator!= | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Return true
if the specified lhs
and rhs
do not have the same value, and false
otherwise. Two Decimal128
objects do not have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two Decimal128
objects do not have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
Note that a NaN is never equal to anything, including itself:
Decimal128 aNaN = std::numeric_limits<Decimal128>::quiet_NaN(); assert(aNan != aNan);
bool bdldfp::operator!= | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator!= | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
bool bdldfp::operator!= | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator!= | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
and rhs
do not have the same value, and false
otherwise. Two decimal objects do not have the same value if the compareQuietEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two decimal objects do not have the same value if:
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator< | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Return true
if the specified lhs
has a value less than the specified rhs
and false
otherwise. The value of a Decimal128
object lhs
is less than that of an object rhs
if the compareQuietLess
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less than of that of rhs
. In other words, lhs
is less than rhs
if:
lhs
nor rhs
are NaN, or lhs
is zero (positive or negative) and rhs
is positive, or rhs
is zero (positive or negative) and lhs
negative, or lhs
is not positive infinity, or lhs
is negative infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is less than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator< | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator< | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
bool bdldfp::operator< | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator< | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
has a value less than the specified rhs
and false
otherwise. The value of a decimal object lhs
is less than that of an object rhs
if the compareQuietLess
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less than of that of rhs
. In other words, lhs
is less than rhs
if:
lhs
nor rhs
are NaN, or lhs
is zero (positive or negative) and rhs
is positive, or rhs
is zero (positive or negative) and lhs
negative, or lhs
is not positive infinity, or lhs
is negative infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs'is less than that of 'rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator<= | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Return true
if the specified lhs
has a value less than or equal the value of the specified rhs
and false
otherwise. The value of a Decimal128
object lhs
is less than or equal to the value of an object rhs
if the compareQuietLessEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less or equal to that of rhs
. In other words, lhs
is less or equal than rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are positive infinity, or lhs
is negative infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is less or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator<= | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator<= | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
bool bdldfp::operator<= | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator<= | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
has a value less than or equal the value of the specified rhs
and false
otherwise. The value of a decimal object lhs
is less than or equal to the value of an object rhs
if the compareQuietLessEqual
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be less or equal to that of rhs
. In other words, lhs
is less or equal than rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are positive infinity, or lhs
is negative infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is less or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator> | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Return true
if the specified lhs
has a greater value than the specified rhs
and false
otherwise. The value of a Decimal128
object lhs
is greater than that of an object rhs
if the compareQuietGreater
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be greater than of that of rhs
. In other words, lhs
is greater than rhs
if:
lhs
nor rhs
are NaN, or rhs
is zero (positive or negative) and lhs
positive, or lhs
is zero (positive or negative) and rhs
negative, or lhs
is not negative infinity, or lhs
is positive infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is greater than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator> | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator> | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
bool bdldfp::operator> | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator> | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
has a greater value than the specified rhs
and false
otherwise. The value of a decimal object lhs
is greater than that of an object rhs
if the compareQuietGreater
operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs
to be greater than of that of rhs
. In other words, lhs
is greater than rhs
if:
lhs
nor rhs
are NaN, or rhs
is zero (positive or negative) and lhs
positive, or lhs
is zero (positive or negative) and rhs
negative, or lhs
is not negative infinity, or lhs
is positive infinity and rhs
is not, or lhs
and rhs
both represent a real number and the real number of lhs
is greater than that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator>= | ( | Decimal128 | lhs, | |
Decimal128 | rhs | |||
) |
Return true
if the specified lhs
has a value greater than or equal to the value of the specified rhs
and false
otherwise. The value of a Decimal128
object lhs
is greater or equal to a Decimal128
object rhs
if the compareQuietGreaterEqual
operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs
to be greater or equal to that of rhs
. In other words, lhs
is greater than or equal to rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are negative infinity, or lhs
is positive infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is greater or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bool bdldfp::operator>= | ( | Decimal32 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator>= | ( | Decimal128 | lhs, | |
Decimal32 | rhs | |||
) |
bool bdldfp::operator>= | ( | Decimal64 | lhs, | |
Decimal128 | rhs | |||
) |
bool bdldfp::operator>= | ( | Decimal128 | lhs, | |
Decimal64 | rhs | |||
) |
Return true
if the specified lhs
has a value greater than or equal to the value of the specified rhs
and false
otherwise. The value of a decimal object lhs
is greater or equal to a decimal object rhs
if the compareQuietGreaterEqual
operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs
to be greater or equal to that of rhs
. In other words, lhs
is greater than or equal to rhs
if:
lhs
nor rhs
are NaN, or lhs
and rhs
are both zero (positive or negative), or lhs
and rhs
are negative infinity, or lhs
is positive infinity, or lhs
and rhs
both represent a real number and the real number of lhs
is greater or equal to that of rhs
This operation stores the value of the macro EDOM
into errno
if either or both operands are signaling NaN.
bsl::basic_istream<CHARTYPE, TRAITS>& bdldfp::operator>> | ( | bsl::basic_istream< CHARTYPE, TRAITS > & | stream, | |
Decimal128 & | object | |||
) |
Read, into the specified object
, from the specified input stream
an IEEE 128 bit decimal floating-point value as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences) and return a reference providing modifiable access to stream
. If stream
contains a Nan value, it is unspecified if object
will receive a quiet or signaling Nan
. If stream
is not valid on entry stream.good() == false
, this operation has no effect other than setting stream.fail()
to true
. If eof (end-of-file) is found before any non-whitespace characters stream.fail()
is set to true
and object
remains unchanged. If eof is detected after some characters have been read (and successfully interpreted as part of the textual representation of a floating-point value as specified by IEEE-754) then stream.eof()
is set to true. If the first non-whitespace character sequence is not a valid textual representation of a floating-point value (e.g., 12e or e12 or 1*2) the stream.fail()
is set to true and object
will remain unchanged. If a real number value is represented by the character sequence but it is a large positive or negative value that cannot be stored into object
then store the value of the macro ERANGE
into errno
and positive or negative infinity is stored into object
, respectively. If a real number value is represented by the character sequence but it is a small positive or negative value that cannot be stored into object
then store the value of the macro ERANGE
into errno
and positive or negative zero is stored into object
, respectively. If a real number value is represented by the character sequence but it cannot be stored exactly into object
, the value is rounded according to the current rounding direction (of the environment) and then stored into object
.
NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.
bsl::basic_ostream<CHARTYPE, TRAITS>& bdldfp::operator<< | ( | bsl::basic_ostream< CHARTYPE, TRAITS > & | stream, | |
Decimal128 | object | |||
) |
Write the value of the specified object
to the specified output stream
in a single line format as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences), and return a reference providing modifiable access to stream
. If stream
is not valid on entry, this operation has no effect.
NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.
void bdldfp::hashAppend | ( | HASHALG & | hashAlg, | |
const Decimal128 & | object | |||
) |
Pass the specified object
to the specified hashAlg
. This function integrates with the bslh
modular hashing system and effectively provides a bsl::hash
specialization for Decimal128
. Note that two objects which have the same value but different representations will hash to the same value.
bool bdldfp::operator== | ( | const DecimalFormatConfig & | lhs, | |
const DecimalFormatConfig & | rhs | |||
) |
Return true
if the specified lhs
and rhs
objects have the same value, and false
otherwise. Two DecimalFormatConfig
objects have the same value if each of their attributes (respectively) have the same value. Note that comparison of two string type attributes are done via 'bslstrcmp() function.
bool bdldfp::operator!= | ( | const DecimalFormatConfig & | lhs, | |
const DecimalFormatConfig & | rhs | |||
) |
Return true
if the specified lhs
and rhs
objects do not have the same value, and false
otherwise. Two DecimalFormatConfig
objects do not have the same value if any of their attributes (respectively) do not have the same value. Note that comparison of two string type attributes are done via 'bslstrcmp() function.
bool bdldfp::operator== | ( | const Uint128 & | lhs, | |
const Uint128 & | rhs | |||
) |
Return true
if the specified lhs
and the specified rhs
objects have the same value, and false
otherwise. Two Uint128
objects have the same value if both of their low
and high
attributes are the same.
bool bdldfp::operator!= | ( | const Uint128 & | lhs, | |
const Uint128 & | rhs | |||
) |
Return true
if the specified lhs
and the specified rhs
objects do not have the same value, and false
otherwise. Two Uint128
objects do not have the same value if either of their low
and high
attributes are not the same.
Uint128 bdldfp::operator| | ( | Uint128 | lhs, | |
const Uint128 & | rhs | |||
) |
Return an Uint128 object having the value of a the bitwise or between the specified lhs
and the specified rhs
value.
Uint128 bdldfp::operator& | ( | Uint128 | lhs, | |
const Uint128 & | rhs | |||
) |
Return an Uint128 object having the value of a the bitwise and between the specified lhs
and the specified rhs
value.
Uint128 bdldfp::operator^ | ( | Uint128 | lhs, | |
const Uint128 & | rhs | |||
) |
Return an Uint128 object having the value of a the bitwise xor between the specified lhs
and the specified rhs
value.
Uint128 bdldfp::operator<< | ( | Uint128 | lhs, | |
int | rhs | |||
) |
Return an Uint128
value equal to the value of a bitwise left shift of the specified lhs
128-bit integer shifted by the specified rhs
value. The behavior is undefined unless 0 <= rhs < 128
.
Uint128 bdldfp::operator>> | ( | Uint128 | lhs, | |
int | rhs | |||
) |
Return an Uint128
value equal to the value of a bitwise right shift of the specified lhs
128-bit integer shifted by the specified rhs
value. The behavior is undefined unless 0 <= rhs < 128
.