| Modifier and Type | Field and Description |
|---|---|
| public static PyFloat | |
| private static final double | |
| private static final double | |
| pack-priv static final double | |
| private static final BigInteger | |
| private static final BigInteger | |
| private static final double | |
| private static final double | |
| private static final double | |
| private static final double | |
| private static final double | |
| public static PyFloat | |
| private static final double | |
| private static final double |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static double | |
| public static double | |
| private static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| private static double | |
| public static double | |
| public static double | |
| public static void | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| private static double | Returns: result ifarg was infinite or result was not infiniteto return (if we return) result, double to include in check arg)Turn an infinite result into a thrown |
| private static double | Returns: result ifarg was NaN or result was not
NaNto return (if we return) result, double to include in check arg)Turn a |
| public static double | |
| public static double | |
| public static double | |
| public static PyLong | |
| public static double | |
| public static double | |
| public static double | |
| public static PyTuple | |
| public static double | |
| public static double | |
| private static long | |
| private static long | |
| public static double | Returns: (x2 +y2)½Returns (x2 +y2)½ without intermediate overflow or underflow. |
| public static boolean | |
| private static boolean | |
| public static boolean | |
| private static boolean | |
| private static boolean | |
| private static boolean | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| private static double | |
| public static double | |
| private static double | |
| public static double | |
| pack-priv static PyException | Returns: ValueError("math domain error")Returns a ValueError("math domain error"), ready to throw from the client code. |
| pack-priv static PyException | Returns: OverflowError("math range error")Returns a OverflowError("math range error"), ready to throw from the client code. |
| public static PyTuple | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static double | |
| public static PyObject |
| e | back to summary |
|---|---|
| public static PyFloat e | |
| EIGHT | back to summary |
|---|---|
| private static final double EIGHT | |
| INF | back to summary |
|---|---|
| private static final double INF | |
| LN2 | back to summary |
|---|---|
| pack-priv static final double LN2 | |
| MAX_LONG_BIGINTEGER | back to summary |
|---|---|
| private static final BigInteger MAX_LONG_BIGINTEGER | |
| MIN_LONG_BIGINTEGER | back to summary |
|---|---|
| private static final BigInteger MIN_LONG_BIGINTEGER | |
| MINUS_ONE | back to summary |
|---|---|
| private static final double MINUS_ONE | |
| MINUS_ZERO | back to summary |
|---|---|
| private static final double MINUS_ZERO | |
| NAN | back to summary |
|---|---|
| private static final double NAN | |
| NINF | back to summary |
|---|---|
| private static final double NINF | |
| ONE | back to summary |
|---|---|
| private static final double ONE | |
| pi | back to summary |
|---|---|
| public static PyFloat pi | |
| TWO | back to summary |
|---|---|
| private static final double TWO | |
| ZERO | back to summary |
|---|---|
| private static final double ZERO | |
| math | back to summary |
|---|---|
| public math() | |
| acos | back to summary |
|---|---|
| public static double acos(double v) | |
| acosh | back to summary |
|---|---|
| public static double acosh(double y) Compute cosh-1y.
| |
| applyLoggedBase | back to summary |
|---|---|
| private static double applyLoggedBase(double loggedValue, PyObject base) | |
| asin | back to summary |
|---|---|
| public static double asin(double v) | |
| asinh | back to summary |
|---|---|
| public static double asinh(double v) | |
| atan | back to summary |
|---|---|
| public static double atan(double v) | |
| atan2 | back to summary |
|---|---|
| public static double atan2(double v, double w) | |
| atanh | back to summary |
|---|---|
| public static double atanh(double y) Compute tanh-1y.
| |
| calculateLongLog | back to summary |
|---|---|
| private static double calculateLongLog(PyLong v) | |
| ceil | back to summary |
|---|---|
| public static double ceil(PyObject v) | |
| ceil | back to summary |
|---|---|
| public static double ceil(double v) | |
| classDictInit | back to summary |
|---|---|
| public static void classDictInit(PyObject dict) | |
| copysign | back to summary |
|---|---|
| public static double copysign(double v, double w) | |
| cos | back to summary |
|---|---|
| public static double cos(double v) | |
| cosh | back to summary |
|---|---|
| public static double cosh(double v) | |
| degrees | back to summary |
|---|---|
| public static double degrees(double v) | |
| erf | back to summary |
|---|---|
| public static double erf(double v) | |
| erfc | back to summary |
|---|---|
| public static double erfc(double v) | |
| exceptInf | back to summary |
|---|---|
| private static double exceptInf(double result, double arg) Turn an infinite result into a thrown
public static double cosh(double v) { return exceptInf( Math.cosh(v), v); }
Note that the original function argument is also supplied to this method. Most Java math
library methods do exactly what we need for Python, but some return an infinity when Python
should raise OverflowError. This is a brief way to change that.
result if
| |
| exceptNaN | back to summary |
|---|---|
| private static double exceptNaN(double result, double arg) throws PyException Turn a
public static double asin(double v) { return exceptNaN(Math.asin(v), v); }
Note that the original function argument is also supplied to this method. Most Java math
library methods do exactly what we need for Python, but some return NaN when
Python should raise ValueError. This is a brief way to change that.
result if
| |
| exp | back to summary |
|---|---|
| public static double exp(double v) | |
| expm1 | back to summary |
|---|---|
| public static double expm1(double v) | |
| fabs | back to summary |
|---|---|
| public static double fabs(double v) | |
| factorial | back to summary |
|---|---|
| public static PyLong factorial(double v) | |
| floor | back to summary |
|---|---|
| public static double floor(PyObject v) | |
| floor | back to summary |
|---|---|
| public static double floor(double v) | |
| fmod | back to summary |
|---|---|
| public static double fmod(double v, double w) | |
| frexp | back to summary |
|---|---|
| public static PyTuple frexp(double x) | |
| fsum | back to summary |
|---|---|
| public static double fsum(final PyObject iterable) | |
| gamma | back to summary |
|---|---|
| public static double gamma(double v) | |
| getLong | back to summary |
|---|---|
| private static long getLong(PyObject pyo) convert a PyObject into a long between Long.MIN_VALUE and Long.MAX_VALUE | |
| getLong | back to summary |
|---|---|
| private static long getLong(PyLong pyLong) convert a PyLong into a long between Long.MIN_VALUE and Long.MAX_VALUE | |
| hypot | back to summary |
|---|---|
| public static double hypot(double x, double y) Returns (x2 +y2)½ without intermediate overflow or underflow. If either argument is infinite, the result is infinite, but overflow during the calculation is detected as an error.
| |
| isinf | back to summary |
|---|---|
public static boolean isinf(double v)
| |
| isIntegral | back to summary |
|---|---|
| private static boolean isIntegral(double v) | |
| isnan | back to summary |
|---|---|
| public static boolean isnan(double v) | |
| isninf | back to summary |
|---|---|
| private static boolean isninf(double v) | |
| isOdd | back to summary |
|---|---|
| private static boolean isOdd(double v) | |
| ispinf | back to summary |
|---|---|
| private static boolean ispinf(double v) | |
| ldexp | back to summary |
|---|---|
| public static double ldexp(double v, PyObject wObj) | |
| lgamma | back to summary |
|---|---|
| public static double lgamma(double v) | |
| log | back to summary |
|---|---|
| public static double log(PyObject v) | |
| log | back to summary |
|---|---|
| public static double log(PyObject v, PyObject base) | |
| log | back to summary |
|---|---|
| private static double log(double v) | |
| log10 | back to summary |
|---|---|
| public static double log10(PyObject v) | |
| log10 | back to summary |
|---|---|
| private static double log10(double v) | |
| log1p | back to summary |
|---|---|
| public static double log1p(double v) | |
| mathDomainError | back to summary |
|---|---|
| pack-priv static PyException mathDomainError() Returns a ValueError("math domain error"), ready to throw from the client code.
| |
| mathRangeError | back to summary |
|---|---|
| pack-priv static PyException mathRangeError() Returns a OverflowError("math range error"), ready to throw from the client code.
| |
| modf | back to summary |
|---|---|
| public static PyTuple modf(double v) | |
| pow | back to summary |
|---|---|
| public static double pow(double v, double w) | |
| radians | back to summary |
|---|---|
| public static double radians(double v) | |
| sin | back to summary |
|---|---|
| public static double sin(PyObject v) | |
| sin | back to summary |
|---|---|
| public static double sin(double v) | |
| sinh | back to summary |
|---|---|
| public static double sinh(double v) | |
| sqrt | back to summary |
|---|---|
| public static double sqrt(PyObject v) | |
| sqrt | back to summary |
|---|---|
| public static double sqrt(double v) | |
| tan | back to summary |
|---|---|
| public static double tan(double v) | |
| tanh | back to summary |
|---|---|
| public static double tanh(double v) | |
| trunc | back to summary |
|---|---|
| public static PyObject trunc(PyObject number) | |