Diagnosing machine parameters.
The following attributes are available:
ibeta - radix in which numbers are represented
it - number of base-ibeta digits in the floating point mantissa M
machep - exponent of the smallest (most negative) power of ibeta that,
added to 1.0,
gives something different from 1.0
eps - floating-point number beta**machep (floating point precision)
negep - exponent of the smallest power of ibeta that, substracted
from 1.0, gives something different from 1.0
epsneg - floating-point number beta**negep
iexp - number of bits in the exponent (including its sign and bias)
minexp - smallest (most negative) power of ibeta consistent with there
being no leading zeros in the mantissa
xmin - floating point number beta**minexp (the smallest (in
magnitude) usable floating value)
maxexp - smallest (positive) power of ibeta that causes overflow
xmax - (1-epsneg)* beta**maxexp (the largest (in magnitude)
usable floating value)
irnd - in range(6), information on what kind of rounding is done
in addition, and on how underflow is handled
ngrd - number of 'guard digits' used when truncating the product
of two mantissas to fit the representation
epsilon - same as eps
tiny - same as xmin
huge - same as xmax
precision - int(-log10(eps))
resolution - 10**(-precision)
Reference:
Numerical Recipies.
Method summary
- __init__(self, float_conv = float, int_conv = int, float_to_float = float, float_to_str = lambda v: ('%24.16e' mod v), title = 'Python floating point number')
- __str__(self)
Methods
- __init__(self, float_conv = float, int_conv = int, float_to_float = float, float_to_str = lambda v: ('%24.16e' mod v), title = 'Python floating point number')
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
- __str__(self)