On this page
numpy.MachAr
class numpy.MachAr(float_conv=<class 'float'>, int_conv=<class 'int'>, float_to_float=<class 'float'>, float_to_str=<function MachAr.<lambda>>, title='Python floating point number')[source]-
Diagnosing machine parameters.
- Parameters
-
float_convfunction, optional-
Function that converts an integer or integer array to a float or float array. Default is
float. int_convfunction, optional-
Function that converts a float or float array to an integer or integer array. Default is
int. float_to_floatfunction, optional-
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_to_strfunction, optional-
Function that converts a single float to a string. Default is
lambda v:'%24.16e' %v. titlestr, optional-
Title that is printed in the string representation of
MachAr.
References
1-
Press, Teukolsky, Vetterling and Flannery, “Numerical Recipes in C++,” 2nd ed, Cambridge University Press, 2002, p. 31.
- Attributes
-
ibetaint-
Radix in which numbers are represented.
itint-
Number of base-
ibetadigits in the floating point mantissa M. machepint-
Exponent of the smallest (most negative) power of
ibetathat, added to 1.0, gives something different from 1.0 epsfloat-
Floating-point number
beta**machep(floating point precision) negepint-
Exponent of the smallest power of
ibetathat, subtracted from 1.0, gives something different from 1.0. epsnegfloat-
Floating-point number
beta**negep. iexpint-
Number of bits in the exponent (including its sign and bias).
minexpint-
Smallest (most negative) power of
ibetaconsistent with there being no leading zeros in the mantissa. xminfloat-
Floating-point number
beta**minexp(the smallest [in magnitude] positive floating point number with full precision). maxexpint-
Smallest (positive) power of
ibetathat causes overflow. xmaxfloat-
(1-epsneg) * beta**maxexp(the largest [in magnitude] usable floating value). irndint-
In
range(6), information on what kind of rounding is done in addition, and on how underflow is handled. ngrdint-
Number of ‘guard digits’ used when truncating the product of two mantissas to fit the representation.
epsilonfloat-
Same as
eps. tinyfloat-
Same as
xmin. hugefloat-
Same as
xmax. precisionfloat-
- int(-log10(eps)) resolutionfloat-
- 10**(-precision)
© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.20/reference/generated/numpy.MachAr.html