Math Functions

math.isfinite()

Check whether a value is neither infinity nor NaN.

Formal Syntax & Structure

python syntaxpython
math.isfinite(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.isfinite(12.5))
Python Reference