| Home | Trees | Index | Help |
|---|
| Module double |
|
| Function Summary | |
|---|---|
| float |
Return a floating-point number whose absolute value matches x and whose sign matches y. |
| long |
Similar to doubleToRawLongBits, but standardize
NaNs. |
| long |
Return the IEEE 754 bit representation (64 bits as a long integer) of the given double-precision floating-point value. |
| float |
Divide two numbers according to IEEE 754 floating-point semantics. |
| str |
Return a string indicating the classification of the given value as one of 'NAN', 'INFINITE', 'ZERO', 'SUBNORMAL', or 'NORMAL'. |
| bool |
Return True if the given value is a finite number;
False if it is NaN or infinity. |
| bool |
Return True if the given value represents positive or negative
infinity; False otherwise. |
| bool |
Return True if given value is not a number; False
if it is a number. |
| bool |
Return True if the given value is a normal floating-point
number; False if it is NaN, infinity, or a denormalized
(subnormal) number. |
| float |
Return the double-precision floating-point value corresponding to the given bit pattern bits. |
| bool |
Test whether the sign bit of the given floating-point value is set. |
| Variable Summary | |
|---|---|
float |
EPSILON = 2.2204460492503131e-16 |
float |
MAX_VALUE = 1.7976931348623157e+308 |
float |
MIN_NORMAL = 2.2250738585072014e-308 |
float |
MIN_VALUE = 4.9406564584124654e-324 |
float |
NAN = nan |
float |
NEGATIVE_INFINITY = -inf |
float |
NEGATIVE_ZERO = -0.0 |
float |
POSITIVE_INFINITY = inf |
| Function Details |
|---|
copysign(x, y)Return a floating-point number whose absolute value matchesx and whose sign matches y. This can be used
to copy the sign of negative zero, as follows:
>>> copysign(1, NEGATIVE_ZERO) -1.0
|
doubleToLongBits(value)Similar todoubleToRawLongBits, but standardize
NaNs.
|
doubleToRawLongBits(value)
|
fdiv(x, y)Divide two numbers according to IEEE 754 floating-point semantics. Division by zero does not raise an exception, but produces negative or positive infinity or NaN as a result.>>> fdiv(+1, +0.0) == POSITIVE_INFINITY True >>> fdiv(-1, +0.0) == NEGATIVE_INFINITY True >>> fdiv(+1, -0.0) == NEGATIVE_INFINITY True >>> fdiv(-1, -0.0) == POSITIVE_INFINITY True >>> isnan(fdiv(0.0, 0.0)) True
|
fpclassify(value)
|
isfinite(value)
|
isinf(value)
|
isnan(value)
|
isnormal(value)
|
longBitsToDouble(bits)
|
signbit(value)Test whether the sign bit of the given floating-point value is set. If it is set, this generally means the given value is negative. However, this is not the same as comparing the value to0.0. For example:
>>> NEGATIVE_ZERO < 0.0 Falsesince negative zero is numerically equal to positive zero. But the sign bit of negative zero is indeed set: >>> signbit(NEGATIVE_ZERO) True >>> signbit(0.0) False
|
| Variable Details |
|---|
EPSILON
|
MAX_VALUE
|
MIN_NORMAL
|
MIN_VALUE
|
NAN
|
NEGATIVE_INFINITY
|
NEGATIVE_ZERO
|
POSITIVE_INFINITY
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Feb 15 05:32:54 2007 | http://epydoc.sf.net |