Add missing 3.3+ and 3.5+ math functions (#164)

Python 3.3 added the `math.log2` function; Python 3.5 added
`math.gcd`, `math.inf`, `math.isclose`, and `math.nan`.
This commit is contained in:
Michael Lee
2016-04-25 21:40:40 -07:00
committed by Guido van Rossum
parent 79554d6da2
commit ce59cd4056

View File

@@ -7,6 +7,9 @@ import sys
e = ... # type: float
pi = ... # type: float
if sys.version_info >= (3, 5):
inf = ... # type: float
nan = ... # type: float
def acos(x: float) -> float: ...
def acosh(x: float) -> float: ...
@@ -31,7 +34,11 @@ def fmod(x: float, y: float) -> float: ...
def frexp(x: float) -> Tuple[float, int]: ...
def fsum(iterable: Iterable) -> float: ...
def gamma(x: float) -> float: ...
if sys.version_info >= (3, 5):
def gcd(a: int, b: int) -> int: ...
def hypot(x: float, y: float) -> float: ...
if sys.version_info >= (3, 5):
def isclose(a: float, b: float, rel_tol: float = ..., abs_tol: float = ...) -> bool: ...
def isinf(x: float) -> bool: ...
if sys.version_info[0] >= 3:
def isfinite(x: float) -> bool: ...
@@ -41,6 +48,8 @@ def lgamma(x: float) -> float: ...
def log(x: float, base: float = ...) -> float: ...
def log10(x: float) -> float: ...
def log1p(x: float) -> float: ...
if sys.version_info >= (3, 3):
def log2(x: float) -> float: ...
def modf(x: float) -> Tuple[float, float]: ...
def pow(x: float, y: float) -> float: ...
def radians(x: float) -> float: ...