isFinite

Determines whether x is a finite number.

bool
isFinite
(
F
)
(
F x
)

Parameters

F

Type of the floating point number.

x F

Floating point number.

Return Value

Type: bool

$(D_KEYWORD true) if x is a finite number, $(D_KEYWORD false) otherwise.

Examples

assert(!isFinite(float.infinity));
assert(!isFinite(-double.infinity));
assert(isFinite(0.0));
assert(!isFinite(float.nan));
assert(isFinite(5.87747e-38f / 10));
assert(isFinite(1.11254e-307 / 10));
assert(isFinite(0.5));

See Also

$(D_PSYMBOL isInfinity).

Meta