Full name
math.inf
Library
math
Syntax
math.inf
Description
math.inf represents the positive infinitive real number. The result is equivalent to float ("inf") .
Parameters
math.inf does not accept arguments.
Result
math.inf returns a real number.
Examples
Let's confirm, first of all, the type of the returned result:
type(math.inf)
float
We see that, indeed, it is a real number.
Let's now see the output of this attribute:
print(math.inf)
inf
We can confirm that the result is considered an infinite value with the math.isinf function:
math.isinf(math.inf)
True
Let's now confirm that this attribute returns a value equivalent to float("inf") :
float("inf") == math.inf
True