Quick Links: |
#include <bdldfp_decimalimputil.h>
This struct
provides a namespace for utility functions that implement core decimal floating-poing operations.
See Component bdldfp_decimalimputil
typedef Imp::ValueType32 bdldfp::DecimalImpUtil::ValueType32 |
typedef Imp::ValueType64 bdldfp::DecimalImpUtil::ValueType64 |
typedef Imp::ValueType128 bdldfp::DecimalImpUtil::ValueType128 |
static ValueType64 bdldfp::DecimalImpUtil::makeDecimal64 | ( | int | significand, | |
int | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::makeDecimal64 | ( | unsigned int | significand, | |
int | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::makeDecimal64 | ( | long long int | significand, | |
int | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::makeDecimal64 | ( | unsigned long long int | significand, | |
int | exponent | |||
) | [static] |
Return a Decimal64
object that has the specified significand
and exponent
, rounded according to the current decimal rounding mode, if necessary. If an overflow condition occurs, store the value of the macro ERANGE
into errno
and return infinity with the appropriate sign.
static ValueType64 bdldfp::DecimalImpUtil::makeInfinity64 | ( | bool | isNegative = false |
) | [static] |
Return a ValueType64
representing infinity. Optionally specify whether the infinity isNegative
. If isNegative
is false
or is is not supplied, the returned value will be infinity, and negative infinity otherwise.
static int bdldfp::DecimalImpUtil::classify | ( | ValueType32 | x | ) | [static] |
static int bdldfp::DecimalImpUtil::classify | ( | ValueType64 | x | ) | [static] |
static int bdldfp::DecimalImpUtil::classify | ( | ValueType128 | x | ) | [static] |
Return the integer value that respresents the floating point classification of the specified x
value as follows:
x
is NaN, return FP_NAN; x
is positive or negative infinity, return FP_INFINITE
; x
is a subnormal value, return FP_SUBNORMAL
x
is a zero value, return FP_ZERO
FP_NORMAL
Note that the mention FP_XXX
constants are C99 standard macros and they are defined in the math.h (cmath) standard header. On systems that fail to define those standard macros we define the in this component as public macros.
static ValueType32 bdldfp::DecimalImpUtil::normalize | ( | ValueType32 | original | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::normalize | ( | ValueType64 | original | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::normalize | ( | ValueType128 | original | ) | [static] |
Return a ValueTypeXX
number having the value as the specified 'original, but with the significand, that can not be divided by ten, and appropriate exponent.
static ValueType32 bdldfp::DecimalImpUtil::quantize | ( | ValueType32 | value, | |
ValueType32 | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::quantize | ( | ValueType64 | value, | |
ValueType64 | exponent | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::quantize | ( | ValueType128 | value, | |
ValueType128 | exponent | |||
) | [static] |
Return a number equal to the specified value
(except for possible rounding) having the exponent equal to the exponent of the specified exponent
. Rounding may occur when the exponent is greater than the quantum of value
. E.g., quantize(147e-2_d32, 1e-1_d32)
yields 15e-1_d32
. In the opposite direction, if exponent
is sufficiently less than the quantum of value
, it may not be possible to construct the requested result, and if so, NaN
is returned. E.g., quantize(1234567e0_d32, 1e-1_d32)
returns NaN
.
static ValueType32 bdldfp::DecimalImpUtil::quantize | ( | ValueType32 | value, | |
int | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::quantize | ( | ValueType64 | value, | |
int | exponent | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::quantize | ( | ValueType128 | value, | |
int | exponent | |||
) | [static] |
Return a number equal to the specified value
(except for possible rounding) having the specified exponent
. Rounding may occur when exponent
is greater than the quantum of value
. E.g., quantize(147e-2_d32, -1)
yields 15e-1_d32
. In the opposite direction, if exponent
is sufficiently less than the quantum of value
, it may not be possible to construct the requested result, and if so, NaN
is returned. E.g., quantize(1234567e0_d32, -1)
returns NaN
. Behavior is undefined unless the exponent
satisfies the following conditions
Decimal32
type: -101 <= exponent <= 90
Decimal64
type: -398 <= exponent <= 369
Decimal128
type: -6176 <= exponent <= 6111
static int bdldfp::DecimalImpUtil::quantizeEqual | ( | ValueType32 * | x, | |
ValueType32 | y, | |||
int | exponent | |||
) | [static] |
static int bdldfp::DecimalImpUtil::quantizeEqual | ( | ValueType64 * | x, | |
ValueType64 | y, | |||
int | exponent | |||
) | [static] |
static int bdldfp::DecimalImpUtil::quantizeEqual | ( | ValueType128 * | x, | |
ValueType128 | y, | |||
int | exponent | |||
) | [static] |
If a floating-point number equal to the specified y
and having the specified exponent
can be constructed, set that value into the specified x
and return 0. Otherwise, or if y
is NaN or infinity, leave the contents of x
unchanged and return a non-zero value. The behavior is undefined unless exponent
satisfies the following conditions
Decimal32
type: -101 <= exponent <= 90
Decimal64
type: -398 <= exponent <= 369
Decimal128
type: -6176 <= exponent <= 6111
Example: Decimal32 x;
BSLS_ASSERT(0 == quantizeEqual(&x, 123e+3_d32, 2);
BSLS_ASSERT(1230e+2_d32 == x);
BSLS_ASSERT(0 != quantizeEqual(&x, 123e+3_d32, -2);
BSLS_ASSERT(1230e+2_d32 == x);
static bool bdldfp::DecimalImpUtil::sameQuantum | ( | ValueType32 | x, | |
ValueType32 | y | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::sameQuantum | ( | ValueType64 | x, | |
ValueType64 | y | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::sameQuantum | ( | ValueType128 | x, | |
ValueType128 | y | |||
) | [static] |
Return true
if the specified x
and y
values have the same quantum exponents, and false
otherwise. If both arguments are NaN or both arguments are infinity, they have the same quantum exponents. Note that if exactly one operand is NaN or exactly one operand is infinity, they do not have the same quantum exponents.
static int bdldfp::DecimalImpUtil::decompose | ( | int * | sign, | |
unsigned int * | significand, | |||
int * | exponent, | |||
ValueType32 | value | |||
) | [static] |
static int bdldfp::DecimalImpUtil::decompose | ( | int * | sign, | |
bsls::Types::Uint64 * | significand, | |||
int * | exponent, | |||
ValueType64 | value | |||
) | [static] |
static int bdldfp::DecimalImpUtil::decompose | ( | int * | sign, | |
Uint128 * | significand, | |||
int * | exponent, | |||
ValueType128 | value | |||
) | [static] |
Decompose the specified decimal value
into the components of the decimal floating-point format and load the result into the specified sign
, significand
and exponent
such that value
is equal to sign * significand * (10 ** exponent)
. The special values infinity and NaNs are decomposed to sign
, exponent
and significand
parts, even though they don't have their normal meaning (except sign
). That is those specific values cannot be restored using these parts, unlike the finite ones. Return the integer value that represents the floating point classification of the specified value
as follows:
value
is NaN, return FP_NAN; value
is infinity, return FP_INFINITE
; value
is a subnormal value, return FP_SUBNORMAL
; value
is a zero value, return FP_ZERO
; FP_NORMAL
. Note that a decomposed representation may not be unique, for example 10 can be represented as either 10 * (10 ** 0)
or 1 * (10 ** 1)
. The returned significand
and exponent
reflect the encoded representation of value
(i.e., they reflect the quantum
of value
).
static int bdldfp::DecimalImpUtil::format | ( | char * | buffer, | |
int | length, | |||
ValueType32 | value, | |||
const DecimalFormatConfig & | cfg | |||
) | [static] |
static int bdldfp::DecimalImpUtil::format | ( | char * | buffer, | |
int | length, | |||
ValueType64 | value, | |||
const DecimalFormatConfig & | cfg | |||
) | [static] |
static int bdldfp::DecimalImpUtil::format | ( | char * | buffer, | |
int | length, | |||
ValueType128 | value, | |||
const DecimalFormatConfig & | cfg | |||
) | [static] |
Format the specified value
, according to the parameters in the specified cfg
. Place the output in the buffer designated by the specified buffer
and length
, and return the length of the formatted value. If there is insufficient room in the buffer, its contents will be left in an unspecified state, with the returned value indicating the necessary size. This function does not write a terminating null character. If length
is not positive, buffer
is permitted to be null. This can be used to determine the necessary buffer size. See the Attributes section under @DESCRIPTION in the component-level documentation for bdldfp::DecimalFormatConfig
component for information on the configuration attributes.
Note that for some combinations of value
and precision provided by cfg
object, the number being written must first be rounded to fewer digits than it initially contains. The number written must be as close as possible to the initial value given the constraints on precision. The rounding should be done as "round-half-up", i.e., round up in magnitude when the first of the discarded digits is between 5 and 9.
Also note that if the configuration format attribute style
is e_NATURAL
then all significand digits of the value
are output in the buffer regardless of the value specified in configuration's precision
attribute.
static ValueType32 bdldfp::DecimalImpUtil::int32ToDecimal32 | ( | int | value | ) | [static] |
static ValueType32 bdldfp::DecimalImpUtil::uint32ToDecimal32 | ( | unsigned int | value | ) | [static] |
static ValueType32 bdldfp::DecimalImpUtil::int64ToDecimal32 | ( | long long int | value | ) | [static] |
static ValueType32 bdldfp::DecimalImpUtil::uint64ToDecimal32 | ( | unsigned long long int | value | ) | [static] |
Return a Decimal32
object having the value closest to the specified value
following the conversion rules as defined by IEEE-754:
value
is zero then initialize this object to a zero with an unspecified sign and an unspecified exponent. value
has a value that is not exactly representable using std::numeric_limits<Decimal32>max_digit
decimal digits then return a decimal value initialized to the value of value
rounded according to the rounding direction. value
. The exponent 0 (quantum 1e-6) is preferred during conversion unless it would cause unnecessary loss of precision.
static ValueType64 bdldfp::DecimalImpUtil::int32ToDecimal64 | ( | int | value | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::uint32ToDecimal64 | ( | unsigned int | value | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::int64ToDecimal64 | ( | long long int | value | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::uint64ToDecimal64 | ( | unsigned long long int | value | ) | [static] |
Return a Decimal64
object having the value closest to the specified value
following the conversion rules as defined by IEEE-754:
value
is zero then initialize this object to a zero with an unspecified sign and an unspecified exponent. value
has a value that is not exactly representable using std::numeric_limits<Decimal64>max_digit
decimal digits then return a decimal value initialized to the value of value
rounded according to the rounding direction. value
. The exponent 0 (quantum 1e-15) is preferred during conversion unless it would cause unnecessary loss of precision.
static ValueType128 bdldfp::DecimalImpUtil::int32ToDecimal128 | ( | int | value | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::uint32ToDecimal128 | ( | unsigned int | value | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::int64ToDecimal128 | ( | long long int | value | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::uint64ToDecimal128 | ( | unsigned long long int | value | ) | [static] |
Return a Decimal128
object having the value closest to the specified value
subject to the conversion rules as defined by IEEE-754:
value
is zero then initialize this object to a zero with an unspecified sign and an unspecified exponent. value
has a value that is not exactly representable using std::numeric_limits<Decimal128>max_digit
decimal digits then return a decimal value initialized to the value of value
rounded according to the rounding direction. value
. The exponent 0 (quantum 1e-33) is preferred during conversion unless it would cause unnecessary loss of precision.
static ValueType32 bdldfp::DecimalImpUtil::add | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::add | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::add | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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 the maximum value supported by the indicated result type 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
. static ValueType32 bdldfp::DecimalImpUtil::subtract | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::subtract | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::subtract | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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
. rhs
has a zero value (positive or negative), then return lhs
. lhs
and rhs
has an absolute value that is larger than the maximum value supported by the indicated result type 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
. static ValueType32 bdldfp::DecimalImpUtil::multiply | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::multiply | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::multiply | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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 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. 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. rhs
and the number represented by rhs
. static ValueType32 bdldfp::DecimalImpUtil::divide | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::divide | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::divide | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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
by the value of rhs
results in an absolute value that is larger than the maximum value supported by the result type 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 min value supported by the indicated result type 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
. static ValueType32 bdldfp::DecimalImpUtil::copySign | ( | ValueType32 | x, | |
ValueType32 | y | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::copySign | ( | ValueType64 | x, | |
ValueType64 | y | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::copySign | ( | ValueType128 | x, | |
ValueType128 | y | |||
) | [static] |
Return a decimal value with the magnitude of the specifed x
and the sign of the specified y
. If x
is NaN, then NaN with the sign of y
is returned.
Examples: copysign( 5.0, -2.0)
==> -5.0; copysign(-5.0, -2.0)
==> -5.0
static ValueType32 bdldfp::DecimalImpUtil::exp | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::exp | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::exp | ( | ValueType128 | x | ) | [static] |
Return e
(Euler's number, 2.7182818) raised to the specified power x
.
Special value handling:
x
is +/-0, 1 is returned. x
is negative infinity, +0 is returned. x
is +infinity, +infinity is returned. x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is finite, but the result value is outside the range of the return type, store the value of the macro ERANGE
into errno
and +infinity value is returned. static ValueType32 bdldfp::DecimalImpUtil::log | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::log | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::log | ( | ValueType128 | x | ) | [static] |
Return the natural (base e
) logarithm of the specified x
.
Special value handling:
x
is +/-0, -infinity is returned and the value of the macro ERANGE
is stored into errno
. x
is 1, +0 is returned. x
is negative, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +infinity, +infinity is returned. x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. static ValueType32 bdldfp::DecimalImpUtil::logB | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::logB | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::logB | ( | ValueType128 | x | ) | [static] |
Return the FLT_RADIX-based logarithm (i.e., base 10) of the absolute value of the specified x
.
Special value handling:
x
is +/-0, -infinity is returned and the value of the macro ERANGE
is stored into errno
. x
is 1, +0 is returned. x
is +/-infinity, +infinity is returned. x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. Examples: logB( 10.0)
==> 1.0; logB(-100.0)
==> 2.0
static ValueType32 bdldfp::DecimalImpUtil::log10 | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::log10 | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::log10 | ( | ValueType128 | x | ) | [static] |
Return the common (base-10) logarithm of the specified x
.
Special value handling:
x
is +/-0, -infinity is returned and the value of the macro ERANGE
is stored into errno
. x
is 1, +0 is returned. x
is negative, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +infinity, +infinity is returned. x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. static ValueType32 bdldfp::DecimalImpUtil::fmod | ( | ValueType32 | x, | |
ValueType32 | y | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::fmod | ( | ValueType64 | x, | |
ValueType64 | y | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::fmod | ( | ValueType128 | x, | |
ValueType128 | y | |||
) | [static] |
Return the remainder of the division of the specified x
by the specified y
. The returned value has the same sign as x
and is less than y
in magnitude.
Special value handling:
EDOM
is stored into errno
. x
is +/-infnity and y
is not NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +/-0 and y
is not zero, +/-0 is returned. y
is +/-0, quite NaN is returned and the value of the macro EDOM
is stored into errno
. x
is finite and y
is +/-infnity, x
is returned. static ValueType32 bdldfp::DecimalImpUtil::remainder | ( | ValueType32 | x, | |
ValueType32 | y | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::remainder | ( | ValueType64 | x, | |
ValueType64 | y | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::remainder | ( | ValueType128 | x, | |
ValueType128 | y | |||
) | [static] |
Return the remainder of the division of the specified x
by the specified y
. The remainder of the division operation x/y
calculated by this function is exactly the value x - n*y
, where n
s the integral value nearest the exact value x/y
. When |n - x/y| == 0.5
, the value n
is chosen to be even. Note that in contrast to DecimalImpUtil::fmod()
, the returned value is not guaranteed to have the same sign as x
.
Special value handling:
EDOM
is stored into errno
. y
is +/-0, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +/-infnity and y
is not NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is finite and y
is +/-infnity, x
is returned. static long int bdldfp::DecimalImpUtil::lrint | ( | ValueType32 | x | ) | [static] |
static long int bdldfp::DecimalImpUtil::lrint | ( | ValueType64 | x | ) | [static] |
static long int bdldfp::DecimalImpUtil::lrint | ( | ValueType128 | x | ) | [static] |
static long long int bdldfp::DecimalImpUtil::llrint | ( | ValueType32 | x | ) | [static] |
static long long int bdldfp::DecimalImpUtil::llrint | ( | ValueType64 | x | ) | [static] |
static long long int bdldfp::DecimalImpUtil::llrint | ( | ValueType128 | x | ) | [static] |
Return an integer value nearest to the specified x
. Round x
using the current rounding mode. If x
is +/-infnity, NaN (either signaling or quiet) or the rounded value is outside the range of the return type, store the value of the macro EDOM
into errno
and return implementation-defined value.
static ValueType32 bdldfp::DecimalImpUtil::nextafter | ( | ValueType32 | from, | |
ValueType32 | to | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::nextafter | ( | ValueType64 | from, | |
ValueType64 | to | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::nextafter | ( | ValueType128 | from, | |
ValueType128 | to | |||
) | [static] |
static ValueType32 bdldfp::DecimalImpUtil::nexttoward | ( | ValueType32 | from, | |
ValueType128 | to | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::nexttoward | ( | ValueType64 | from, | |
ValueType128 | to | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::nexttoward | ( | ValueType128 | from, | |
ValueType128 | to | |||
) | [static] |
Return the next representable value of the specified from
in the direction of the specified to
.
Special value handling:
from
equals to
, to
is returned. EDOM
is stored into errno
. from
is finite, but the expected result is infinity, infinity is returned and the value of the macro ERANGE
is stored into errno
. from
does not equal to
and the result is subnormal or zero, the value of the macro ERANGE
is stored into errno
. static ValueType32 bdldfp::DecimalImpUtil::pow | ( | ValueType32 | base, | |
ValueType32 | exp | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::pow | ( | ValueType64 | base, | |
ValueType64 | exp | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::pow | ( | ValueType128 | base, | |
ValueType128 | exp | |||
) | [static] |
Return the value of the specified base
raised to the power of the specified exp
.
Special value handling:
base
is finite and negative and exp
is finite and non-integer, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. ERANGE
is stored into errno
. ERANGE
is stored into errno
. EDOM
is stored into errno
. static ValueType32 bdldfp::DecimalImpUtil::ceil | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::ceil | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::ceil | ( | ValueType128 | x | ) | [static] |
Return the smallest integral value that is not less than the specified x
.
Special value handling:
x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +/-infinity or +/-0, it is returned unmodified. Examples: ceil(0.5)
==> 1.0; ceil(-0.5)
==> 0.0
static ValueType32 bdldfp::DecimalImpUtil::floor | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::floor | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::floor | ( | ValueType128 | x | ) | [static] |
Return the largest integral value that is not greater than the specified x
.
Special value handling:
x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +/-infinity or +/-0, it is returned unmodified. Examples: floor(0.5)
==> 0.0; floor(-0.5)
==> -1.0
static ValueType32 bdldfp::DecimalImpUtil::round | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::round | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::round | ( | ValueType128 | x | ) | [static] |
Return the integral value nearest to the specified x
. Round halfway cases away from zero, regardless of the current decimal floating point rounding mode.
Special value handling:
x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +/-infinity or +/-0, it is returned unmodified. Examples: round(0.5)
==> 1.0; round(-0.5)
==> -1.0
static long int bdldfp::DecimalImpUtil::lround | ( | ValueType32 | x | ) | [static] |
static long int bdldfp::DecimalImpUtil::lround | ( | ValueType64 | x | ) | [static] |
static long int bdldfp::DecimalImpUtil::lround | ( | ValueType128 | x | ) | [static] |
Return the integral value nearest to the specified x
. Round halfway cases away from zero, regardless of the current decimal floating point rounding mode.
Special value handling:
x
is NaN (either quiet or signaling), quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +/-infinity, quite NaN is returned and the value of the macro EDOM
is stored into errno
. EDOM
is stored into errno
. Examples: lround(0.5)
==> 1.0; lround(-0.5)
==> -1.0
static ValueType32 bdldfp::DecimalImpUtil::round | ( | ValueType32 | x, | |
unsigned int | precision | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::round | ( | ValueType64 | x, | |
unsigned int | precision | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::round | ( | ValueType128 | x, | |
unsigned int | precision | |||
) | [static] |
Return the specified x
value rounded to the specified precision
. Round halfway cases away from zero, regardless of the current decimal floating point rounding mode. If x
is integral, positive zero, negative zero, NaN, or infinity then return x
itself.
Examples: round(3.14159, 3)
==> 3.142
static ValueType32 bdldfp::DecimalImpUtil::trunc | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::trunc | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::trunc | ( | ValueType128 | x | ) | [static] |
Return the nearest integral value that is not greater in absolute value than the specified x
.
Special value handling:
x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +/-infinity or +/-0, it is returned unmodified. Examples: trunc(0.5)
==> 0.0; trunc(-0.5)
==> 0.0
static ValueType32 bdldfp::DecimalImpUtil::fma | ( | ValueType32 | x, | |
ValueType32 | y, | |||
ValueType32 | z | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::fma | ( | ValueType64 | x, | |
ValueType64 | y, | |||
ValueType64 | z | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::fma | ( | ValueType128 | x, | |
ValueType128 | y, | |||
ValueType128 | z | |||
) | [static] |
Return, using the specified x
, y
, and z
, the value of the expression x * y + z
, rounded as one ternary operation according to the current decimal floating point rounding mode.
Special value handling:
x
or y
are quiet NaN, quiet NaN is returned. EDOM
is stored into errno
. x*y
is an exact infinity and z
is infinity with the opposite sign, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is zero and y
is infinite or if x
is infinite and y
is zero, and z
is not a NaN, then quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is zero and y
is infinite or if x
is infinite and y
is zero, and z
is NaN, then quiet NaN is returned. static ValueType32 bdldfp::DecimalImpUtil::fabs | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::fabs | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::fabs | ( | ValueType128 | x | ) | [static] |
Return the absolute value of the specified x
.
Special value handling:
x
is NaN (either signaling or quiet), quiet NaN is returned. x
is +/-infinity or +/-0, it is returned unmodified. static ValueType32 bdldfp::DecimalImpUtil::sqrt | ( | ValueType32 | x | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::sqrt | ( | ValueType64 | x | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::sqrt | ( | ValueType128 | x | ) | [static] |
Return the square root of the specified x
.
Special value handling:
x
is quiet NaN, quiet NaN is returned. x
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is less than -0, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is +/-infinity or +/-0, it is returned unmodified. static ValueType32 bdldfp::DecimalImpUtil::negate | ( | ValueType32 | value | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::negate | ( | ValueType64 | value | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::negate | ( | ValueType128 | value | ) | [static] |
Return the result of applying the unary negation (-
) operator to the specified value
as described by IEEE-754. Note that decimal floating point representations can encode signed zero values, thus negating 0 results in -0 and negating -0 results in 0.
static bool bdldfp::DecimalImpUtil::less | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::less | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::less | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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
If either or both operands are signaling NaN, store the value of the macro EDOM
into errno
and return false
.
static bool bdldfp::DecimalImpUtil::greater | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::greater | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::greater | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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
If either or both operands are signaling NaN, store the value of the macro EDOM
into errno
and return false
.
static bool bdldfp::DecimalImpUtil::lessEqual | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::lessEqual | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::lessEqual | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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
If either or both operands are signaling NaN, store the value of the macro EDOM
into errno
and return false
.
static bool bdldfp::DecimalImpUtil::greaterEqual | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::greaterEqual | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::greaterEqual | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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
If either or both operands are signaling NaN, store the value of the macro EDOM
into errno
and return false
.
static bool bdldfp::DecimalImpUtil::equal | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::equal | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::equal | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
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:
If either or both operands are signaling NaN, store the value of the macro EDOM
into errno
and return false
.
static bool bdldfp::DecimalImpUtil::notEqual | ( | ValueType32 | lhs, | |
ValueType32 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::notEqual | ( | ValueType64 | lhs, | |
ValueType64 | rhs | |||
) | [static] |
static bool bdldfp::DecimalImpUtil::notEqual | ( | ValueType128 | lhs, | |
ValueType128 | rhs | |||
) | [static] |
Return false
if the specified lhs
and rhs
have the same value, and true
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:
If either or both operands are signaling NaN, store the value of the macro EDOM
into errno
and return false
.
static ValueType32 bdldfp::DecimalImpUtil::convertToDecimal32 | ( | const ValueType64 & | input | ) | [static] |
static ValueType32 bdldfp::DecimalImpUtil::convertToDecimal32 | ( | const ValueType128 & | input | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::convertToDecimal64 | ( | const ValueType32 & | input | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::convertToDecimal64 | ( | const ValueType128 & | input | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::convertToDecimal128 | ( | const ValueType32 & | input | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::convertToDecimal128 | ( | const ValueType64 & | input | ) | [static] |
Convert the specified input
to the closest value of the indicated result type following the conversion rules as defined by IEEE-754:
input
is signaling NaN, store the value of the macro EDOM
into errno
and return signaling NaN value. input
is NaN, return NaN value. input
is infinity (positive or negative), then return infinity with the same sign. input
is zero (positive or negative), then return zero with the same sign. input
has an absolute value that is larger than maximum or is smaller than minimum value supported by the result type, store the value of the macro ERANGE
into errno
and return infinity or zero with the same sign respectively. input
has a value that is not exactly representable using maximum digit number supported by the indicated result type then return the input
rounded according to the rounding direction. input
value of the result type. static ValueType32 bdldfp::DecimalImpUtil::binaryToDecimal32 | ( | float | value | ) | [static] |
static ValueType32 bdldfp::DecimalImpUtil::binaryToDecimal32 | ( | double | value | ) | [static] |
Create a Decimal32
object having the value closest to the specified value
following the conversion rules as defined by IEEE-754:
value
is signaling NaN, store the value of the macro EDOM
into errno
and return signaling NaN value. value
is NaN, return a NaN. value
is infinity (positive or negative), then return an object equal to infinity with the same sign. value
is a zero value, then return an object equal to zero with the same sign. value
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 value
. value
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 a zero with the same sign as value
. value
needs more than std::numeric_limits<Decimal32>max_digit
significant decimal digits to represent then return the value
rounded according to the rounding direction. Decimal32
object representing value
. static ValueType64 bdldfp::DecimalImpUtil::binaryToDecimal64 | ( | float | value | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::binaryToDecimal64 | ( | double | value | ) | [static] |
Create a Decimal64
object having the value closest to the specified value
following the conversion rules as defined by IEEE-754:
value
is signaling NaN, store the value of the macro EDOM
into errno
and return signaling NaN value. value
is NaN, return a NaN. value
is infinity (positive or negative), then return an object equal to infinity with the same sign. value
is a zero value, then return an object equal to zero with the same sign. value
needs more than std::numeric_limits<Decimal64>max_digit
significant decimal digits to represent then return the value
rounded according to the rounding direction. Decimal64
object representing value
. static ValueType128 bdldfp::DecimalImpUtil::binaryToDecimal128 | ( | float | value | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::binaryToDecimal128 | ( | double | value | ) | [static] |
Create a Decimal128
object having the value closest to the specified value
following the conversion rules as defined by IEEE-754:
value
is signaling NaN, store the value of the macro EDOM
into errno
and return signaling NaN value. value
is NaN, return a NaN. value
is infinity (positive or negative), then return an object equal to infinity with the same sign. value
is a zero value, then return an object equal to zero with the same sign. value
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 value
. value
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 a zero with the same sign as value
. value
needs more than std::numeric_limits<Decimal128>max_digit
significant decimal digits to represent then return the value
rounded according to the rounding direction. Decimal128
object representing value
. static ValueType32 bdldfp::DecimalImpUtil::makeDecimalRaw32 | ( | int | significand, | |
int | exponent | |||
) | [static] |
Create a ValueType32
object representing a decimal floating point number consisting of the specified significand
and exponent
, with the sign given by significand
. The behavior is undefined unless abs(significand) <= 9,999,999
and -101 <= exponent <= 90
.
static ValueType64 bdldfp::DecimalImpUtil::makeDecimalRaw64 | ( | unsigned long long int | significand, | |
int | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::makeDecimalRaw64 | ( | long long int | significand, | |
int | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::makeDecimalRaw64 | ( | unsigned int | significand, | |
int | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::makeDecimalRaw64 | ( | int | significand, | |
int | exponent | |||
) | [static] |
Create a ValueType64
object representing a decimal floating point number consisting of the specified significand
and exponent
, with the sign given by significand
. The behavior is undefined unless abs(significand) <= 9,999,999,999,999,999
and -398 <= exponent <= 369
.
static ValueType128 bdldfp::DecimalImpUtil::makeDecimalRaw128 | ( | unsigned long long int | significand, | |
int | exponent | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::makeDecimalRaw128 | ( | long long int | significand, | |
int | exponent | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::makeDecimalRaw128 | ( | unsigned int | significand, | |
int | exponent | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::makeDecimalRaw128 | ( | int | significand, | |
int | exponent | |||
) | [static] |
Create a ValueType128
object representing a decimal floating point number consisting of the specified significand
and exponent
, with the sign given by significand
. The behavior is undefined unless -6176 <= exponent <= 6111
.
static ValueType32 bdldfp::DecimalImpUtil::scaleB | ( | ValueType32 | value, | |
int | exponent | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::scaleB | ( | ValueType64 | value, | |
int | exponent | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::scaleB | ( | ValueType128 | value, | |
int | exponent | |||
) | [static] |
Return the result of multiplying the specified value
by ten raised to the specified exponent
. The quantum of value
is scaled according to IEEE 754's scaleB
operations.
Special value handling:
value
is quiet NaN, quiet NaN is returned. value
is signaling NaN, quiet NaN is returned and the value of the macro EDOM
is stored into errno
. x
is infinite, then infinity is returned. ERANGE
is stored into errno
.static ValueType32 bdldfp::DecimalImpUtil::parse32 | ( | const char * | input | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::parse64 | ( | const char * | input | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::parse128 | ( | const char * | input | ) | [static] |
static ValueType32 bdldfp::DecimalImpUtil::parse32 | ( | const char * | input, | |
unsigned int * | status | |||
) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::parse64 | ( | const char * | input, | |
unsigned int * | status | |||
) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::parse128 | ( | const char * | input, | |
unsigned int * | status | |||
) | [static] |
Produce an object of the indicated return type by parsing the specified input
string that represents a floating-point number (written in either fixed or scientific notation). Optionally specify status
in which to load a bit mask of additional status information. The resulting decimal object is initialized as follows:
input
does not represent a floating-point value, then return a decimal object of the indicated return type initialized to a NaN. input
represents infinity (positive or negative), as case-insensitive "Inf" or "Infinity" string, then return a decimal object of the indicated return type initialized to infinity value with the same sign. input
represents zero (positive or negative), then return a decimal object of the indicated return type initialized to zero with the same sign. str
represents a value that 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 a decimal object of the indicated return type initialized to infinity with the same sign. input
represents a value that 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 a decimal object of the indicated return type initialized to zero with the same sign. input
has a value that is not exactly representable using std::numeric_limits<Decimal32>max_digit
decimal digits then return a decimal object of the indicated return type initialized to the value represented by input
rounded according to the rounding direction. input
. The *status
, if supplied, mest be 0, and may be loaded with a bit mask of k_STATUS_INEXACT
, k_STATUS_UNDERFLOW
, and k_STATUS_OVERFLOW
indicating wether the conversion from text was inexact, underflowed, or overflowed (or some combination) respectively. The behavior is undefined unless *status
(if supplied) is 0.
Note that the parsing follows the rules as specified for the strtod32
function in section 9.6 of the ISO/EIC TR 24732 C Decimal Floating-Point Technical Report.
Also note that the quanta of the resultant value is determined by the number of decimal places starting with the most significand digit in input
string and cannot exceed the maximum number of digits necessary to differentiate all values of the indicated return type, for example:
'parse32("0.015") => 15e-3' 'parse32("1.5") => 15e-1' 'parse32("1.500") => 1500e-3' 'parse32("1.2345678) => 1234568e-6'
static ValueType32 bdldfp::DecimalImpUtil::convertDPDtoBID | ( | DecimalStorage::Type32 | dpd | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::convertDPDtoBID | ( | DecimalStorage::Type64 | dpd | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::convertDPDtoBID | ( | DecimalStorage::Type128 | dpd | ) | [static] |
Return a ValueTypeXX
representing the specified dpd
, which is currently in Densely Packed Decimal (DPD) format. This format is compatible with the IBM compiler's native type.
static DecimalStorage::Type32 bdldfp::DecimalImpUtil::convertBIDtoDPD | ( | ValueType32 | value | ) | [static] |
static DecimalStorage::Type64 bdldfp::DecimalImpUtil::convertBIDtoDPD | ( | ValueType64 | value | ) | [static] |
static DecimalStorage::Type128 bdldfp::DecimalImpUtil::convertBIDtoDPD | ( | ValueType128 | value | ) | [static] |
Return a DecimalStorage::TypeXX
representing the specified value
in Densely Packed Decimal (DPD) format. This format is compatible with the IBM compiler's native type.
static ValueType32 bdldfp::DecimalImpUtil::convertFromBID | ( | DecimalStorage::Type32 | bid | ) | [static] |
static ValueType64 bdldfp::DecimalImpUtil::convertFromBID | ( | DecimalStorage::Type64 | bid | ) | [static] |
static ValueType128 bdldfp::DecimalImpUtil::convertFromBID | ( | DecimalStorage::Type128 | bid | ) | [static] |
Return a ValueTypeXX
representing the specified bid
, which is currently in Binary Integral Decimal (BID) format. This format is compatible with the Intel DFP implementation type.
static DecimalStorage::Type32 bdldfp::DecimalImpUtil::convertToBID | ( | ValueType32 | value | ) | [static] |
static DecimalStorage::Type64 bdldfp::DecimalImpUtil::convertToBID | ( | ValueType64 | value | ) | [static] |
static DecimalStorage::Type128 bdldfp::DecimalImpUtil::convertToBID | ( | ValueType128 | value | ) | [static] |
Return a DecimalStorage::TypeXX
representing the specified value
in Binary Integral Decimal (BID) format. This format is compatible with the Intel DFP implementation type.
static ValueType32 bdldfp::DecimalImpUtil::min32 | ( | ) | [static] |
Return the smallest positive normalized number ValueType32
can represent (IEEE-754: +1e-95).
static ValueType32 bdldfp::DecimalImpUtil::max32 | ( | ) | [static] |
Return the largest number ValueType32
can represent (IEEE-754: +9.999999e+96).
static ValueType32 bdldfp::DecimalImpUtil::epsilon32 | ( | ) | [static] |
Return the difference between the least representable value of type ValueType32
greater than 1 and 1 (IEEE-754: +1e-6).
static ValueType32 bdldfp::DecimalImpUtil::roundError32 | ( | ) | [static] |
Return the maximum rounding error for the ValueType32
type. The actual value returned depends on the current decimal floating point rounding setting.
static ValueType32 bdldfp::DecimalImpUtil::denormMin32 | ( | ) | [static] |
Return the smallest positive denormalized value for the ValueType32
type (IEEE-754: +0.000001e-95).
static ValueType32 bdldfp::DecimalImpUtil::infinity32 | ( | ) | [static] |
Return the value that represents positive infinity for the ValueType32
type.
static ValueType32 bdldfp::DecimalImpUtil::quietNaN32 | ( | ) | [static] |
Return a value that represents non-signaling NaN for the ValueType32
type.
static ValueType32 bdldfp::DecimalImpUtil::signalingNaN32 | ( | ) | [static] |
Return a value that represents signaling NaN for the ValueType32
type.
static ValueType64 bdldfp::DecimalImpUtil::min64 | ( | ) | [static] |
Return the smallest positive normalized number ValueType64
can represent (IEEE-754: +1e-383).
static ValueType64 bdldfp::DecimalImpUtil::max64 | ( | ) | [static] |
Return the largest number ValueType64
can represent (IEEE-754: +9.999999999999999e+384).
static ValueType64 bdldfp::DecimalImpUtil::epsilon64 | ( | ) | [static] |
Return the difference between the least representable value of type ValueType64
greater than 1 and 1 (IEEE-754: +1e-15).
static ValueType64 bdldfp::DecimalImpUtil::roundError64 | ( | ) | [static] |
Return the maximum rounding error for the ValueType64
type. The actual value returned depends on the current decimal floating point rounding setting.
static ValueType64 bdldfp::DecimalImpUtil::denormMin64 | ( | ) | [static] |
Return the smallest positive denormalized value for the ValueType64
type (IEEE-754: +0.000000000000001e-383).
static ValueType64 bdldfp::DecimalImpUtil::infinity64 | ( | ) | [static] |
Return the value that represents positive infinity for the ValueType64
type.
static ValueType64 bdldfp::DecimalImpUtil::quietNaN64 | ( | ) | [static] |
Return a value that represents non-signaling NaN for the ValueType64
type.
static ValueType64 bdldfp::DecimalImpUtil::signalingNaN64 | ( | ) | [static] |
Return a value that represents signaling NaN for the ValueType64
type.
static ValueType128 bdldfp::DecimalImpUtil::min128 | ( | ) | [static] |
Return the smallest positive normalized number ValueType128
can represent (IEEE-754: +1e-6143).
static ValueType128 bdldfp::DecimalImpUtil::max128 | ( | ) | [static] |
Return the largest number ValueType128
can represent (IEEE-754: +9.999999999999999999999999999999999e+6144).
static ValueType128 bdldfp::DecimalImpUtil::epsilon128 | ( | ) | [static] |
Return the difference between the least representable value of type ValueType128
greater than 1 and 1 (IEEE-754: +1e-33).
static ValueType128 bdldfp::DecimalImpUtil::roundError128 | ( | ) | [static] |
Return the maximum rounding error for the ValueType128
type. The actual value returned depends on the current decimal floating point rounding setting.
static ValueType128 bdldfp::DecimalImpUtil::denormMin128 | ( | ) | [static] |
Return the smallest positive denormalized value for the ValueType128
type (IEEE-754: +0.000000000000000000000000000000001e-6143).
static ValueType128 bdldfp::DecimalImpUtil::infinity128 | ( | ) | [static] |
Return the value that represents positive infinity for the ValueType128
type.
static ValueType128 bdldfp::DecimalImpUtil::quietNaN128 | ( | ) | [static] |
Return a value that represents non-signaling NaN for the ValueType128
type.
static ValueType128 bdldfp::DecimalImpUtil::signalingNaN128 | ( | ) | [static] |
Return a value that represents signaling NaN for the ValueType128
type.