class MachAr: (source)
Diagnosing machine parameters.
References
[1] | Press, Teukolsky, Vetterling and Flannery, "Numerical Recipes in C++," 2nd ed, Cambridge University Press, 2002, p. 31. |
Parameters | |
float | Function that converts an integer or integer array to a float
or float array. Default is float . |
int | Function that converts a float or float array to an integer or
integer array. Default is int . |
float | Function that converts a float array to float. Default is float .
Note that this does not seem to do anything useful in the current
implementation. |
float | Function that converts a single float to a string. Default is lambda v:'%24.16e' %v. |
title | Title that is printed in the string representation of MachAr . |
Method | __init__ |
float_conv - convert integer to float (array) int_conv - convert float (array) to integer float_to_float - convert float array to float float_to_str - convert array float to str title - description of used floating point numbers... |
Method | __str__ |
Undocumented |
Instance Variable | eps |
Floating-point number beta**machep (floating point precision) |
Instance Variable | epsilon |
Same as eps . |
Instance Variable | epsneg |
Floating-point number beta**negep. |
Instance Variable | huge |
Same as xmax . |
Instance Variable | ibeta |
Radix in which numbers are represented. |
Instance Variable | iexp |
Number of bits in the exponent (including its sign and bias). |
Instance Variable | irnd |
In range(6), information on what kind of rounding is done in addition, and on how underflow is handled. |
Instance Variable | it |
Number of base-ibeta digits in the floating point mantissa M. |
Instance Variable | machep |
Exponent of the smallest (most negative) power of ibeta that, added to 1.0, gives something different from 1.0 |
Instance Variable | maxexp |
Smallest (positive) power of ibeta that causes overflow. |
Instance Variable | minexp |
Smallest (most negative) power of ibeta consistent with there being no leading zeros in the mantissa. |
Instance Variable | negep |
Exponent of the smallest power of ibeta that, subtracted from 1.0, gives something different from 1.0. |
Instance Variable | ngrd |
Number of 'guard digits' used when truncating the product of two mantissas to fit the representation. |
Instance Variable | precision |
- int(-log10(eps)) |
Instance Variable | resolution |
- 10**(-precision) |
Instance Variable | smallest |
The smallest positive floating point number with 1 as leading bit in the mantissa following IEEE-754. Same as xmin . |
Instance Variable | smallest |
The smallest positive floating point number with 0 as leading bit in the mantissa following IEEE-754. |
Instance Variable | tiny |
An alias for smallest_normal , kept for backwards compatibility. |
Instance Variable | title |
Undocumented |
Instance Variable | xmax |
(1-epsneg) * beta**maxexp (the largest [in magnitude] usable floating value). |
Instance Variable | xmin |
Floating-point number beta**minexp (the smallest [in magnitude] positive floating point number with full precision). |
Method | _do |
Undocumented |
Instance Variable | _str |
Undocumented |
Instance Variable | _str |
Undocumented |
Instance Variable | _str |
Undocumented |
Instance Variable | _str |
Undocumented |
Instance Variable | _str |
Undocumented |
Instance Variable | _str |
Undocumented |
Instance Variable | _str |
Undocumented |
float_conv - convert integer to float (array) int_conv - convert float (array) to integer float_to_float - convert float array to float float_to_str - convert array float to str title - description of used floating point numbers
In range(6), information on what kind of rounding is done in addition, and on how underflow is handled.
Exponent of the smallest (most negative) power of ibeta
that,
added to 1.0, gives something different from 1.0
Smallest (most negative) power of ibeta
consistent with there
being no leading zeros in the mantissa.
Exponent of the smallest power of ibeta
that, subtracted
from 1.0, gives something different from 1.0.
Number of 'guard digits' used when truncating the product of two mantissas to fit the representation.
The smallest positive floating point number with 1 as leading bit in
the mantissa following IEEE-754. Same as xmin
.
The smallest positive floating point number with 0 as leading bit in the mantissa following IEEE-754.
Floating-point number beta**minexp (the smallest [in magnitude] positive floating point number with full precision).