A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/ref_math_inf.asp below:

Website Navigation


Python math.inf Constant

Python math.inf Constant

❮ Math Methods

Example

Print the positive and negative infinity:

# Import math Library

import math

# Print the positive infinity

print (math.inf)

# Print the negative infinity

print (-math.inf)

Try it Yourself » Definition and Usage

The math.inf constant returns a floating-point positive infinity.

For negative infinity, use -math.inf.

The inf constant is equivalent to float('inf').

Syntax Technical Details Return Value: A float value, representing the value of positive infinity Python Version: 3.5

❮ Math Methods

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4