Math Functions

math.isinf()

Recognize positive or negative floating-point infinity.

Formal Syntax & Structure

python syntaxpython
math.isinf(x, /)

Parameters & Attributes

NameTypeDescription
xreal numberInput real value.

Return Value

bool

True when the described condition holds, otherwise False.

Working Example

Example Snippetpython
import mathprint(math.isinf(-math.inf))
Python Reference