LoginSignup
0
0

More than 3 years have passed since last update.

[Python]infで正の無限大を表す

Last updated at Posted at 2020-02-04

float('inf')もしくはmath.infを使う。(math.infはPython3.5から)

実行してみる

>>> float('inf')
inf

>>> import math
>>> math.inf
inf

>>> float('inf') == math.inf
True

>>> math.inf > 10 ** 10
True
>>> math.inf < 10 ** 10
False

ドキュメント

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0