isInfinity

Determines if x represents infinity. This operation is silent, no error flags are set and no exceptions are thrown.

@IEEECompliant("isInfinite", 25)
bool
isInfinity
(
D
)
(
auto const ref D x
)

Parameters

x D

a _decimal value

Return Value

Type: bool

true if x is infinite, false otherwise (NaN or any finite value)

Examples

assert(isInfinity(decimal32.infinity));
assert(isInfinity(-decimal64.infinity));
assert(!isInfinity(decimal128.nan));

Meta