Python math.isinf() Method

Math Methods : Check whether a value is infinity or not

Definition and Usage

The math.isinf() method checks whether a number is infinite or not.

This method returns True if the specified number is a positive or negative infinity, otherwise it returns False.

Syntax

math.isinf(x)

Parameter Values

Parameter Description
x Required. The number to check

Technical Details

Return Value: A bool value, True if x is a positive or negative infinity, False otherwise
Python Version: 2.6