isFinite

Determines if x is a finite value. This operation is silent, no error flags are set and no exceptions are thrown.

@IEEECompliant("isFinite", 25)
bool
isFinite
(
D : Decimal!bits
int bits
)
(
auto const ref D x
)

Parameters

x D

a _decimal value

Return Value

Type: bool

true if x is finite, false otherwise (NaN or infinity)

Examples

assert(isFinite(decimal32.max));
assert(!isFinite(decimal64.nan));
assert(!isFinite(decimal128.infinity));

Meta