Floating point classification VCL features
Floating point classification functions.
Functions
 math.is_finite() — Determines whether a floating point value is finite.
 math.is_infinite() — Determines whether a floating point value is an infinity.
 math.is_nan() — Determines whether a floating point value is NaN (Not a Number).
 math.is_normal() — Determines whether a floating point value is normal.
 math.is_subnormal() — Determines whether a floating point value is subnormal.
Floating point values are grouped into one of several classifications:

Finite — math.is_finite()
A value that is neither NaN nor an infinity.

Subnormal — math.is_subnormal()
The
FLOAT
type supports subnormals (also known as denormals). 
NaN — math.is_nan()
The
FLOAT
type may express NaN (Not a Number). In general, arithmetic operations involving a NaN will produce NaN. NaN values are signaled through thefastly.error
variable.There is no literal syntax for assigning NaN, but a math.NAN constant is provided.

Normal — math.is_normal()
A value that is neither NaN, subnormal, an infinity nor a zero.
Note that "normal" is not the exact opposite of "subnormal" because of the other possible nonsubnormal values.

Infinite — math.is_infinite()
The
FLOAT
type may express IEEE 754 infinities. These are signed values. Infinities behave with special semantics for some operators.There is no literal syntax for assigning infinities, but math.POS_INFINITY and math.NEG_INFINITY constants are provided.

Zero — There are two kinds of zero: positive and negative. Both compare equal.
No VCL function is provided to determine whether a floating point value is a zero. Because both positive and negative zero compare equal, a comparison may be made simply by
var.x == 0
.