decimalClass

Returns the decimal class where x falls into. This operation is silent, no exception flags are set and no exceptions are thrown.

@IEEECompliant("class", 25)
decimalClass
(
D
)
(
auto const ref D x
)

Parameters

x D

a _decimal value

Return Value

One of the members of DecimalClass enumeration

Examples

assert(decimalClass(decimal32.nan) == DecimalClass.quietNaN);
assert(decimalClass(decimal64.infinity) == DecimalClass.positiveInfinity);
assert(decimalClass(decimal128.max) == DecimalClass.positiveNormal);
assert(decimalClass(-decimal32.max) == DecimalClass.negativeNormal);
assert(decimalClass(decimal128.epsilon) == DecimalClass.positiveNormal);

Meta