To get infinity (Inf), infinitesimal ( - Inf), non - number (NaN)

To get an infinitesimal (Inf), infinitesimal (-Inf), and non-numeric (NaN) numeric representation in Perl:

Infinity Inf

You can get infinity (Inf) by doing a floating point operation that overflows in the positive direction.

9 ** 9 ** 9

Infinitesimal - Inf

You can get infinity (Inf) by doing a floating point operation that overflows in the negative direction.

-9 ** 9 ** 9

Innumerable NaN

You can get a non-number (NaN) by dividing infinity by infinity.

9 ** 9 ** 9/9 ** 9 ** 9

(Reference) Special floating point number: Infinite ( Inf) and non-numerical (NaN)

Related Informatrion