Table of contents Index
Declared in module bhoelHelper
def machar() string __author__ = 'Berthold H\366llmann, firstname.lastname@example.org' string __file__ = '../bhoelHelper/machar.pyc' string __version__ = '1.1' float eps = 2.22044604925e-16 float epsneg = 1.11022302463e-16 int ibeta = 2 int iexp = 11 int irnd = 5 int it = 53 int machdep = -52 int maxexp = 1024 int minexp = -1022 int negep = -53 int ngrd = 0 float xmax = 1.79769313486e+308 float xmin = 2.22507385851e-308
Function to determine machine-specific parameters affecting floating-point arithmetic.
This is build after "NUMERICAL RECIPES in C", second edition, Reprinted 1996, pp. 889.
ibetathat, added to 1.0 gives something different from 1.0.
ibeta'**'machdep, loosly referred to as the
ibetathat, subtracted from 1.0, gives something different from 1.0.
ibeta'**'negep, another way of defining floating-point precision. Not infrequently
epsnegis 0.5 times
ibetaconsistent with there no leading zeros in the mantissa.
ibeta'**'minexp, generally the smallest (in magnitude) usable floating value
ibetathat causes overflow.
irndreturns 2 or 5, then your computer is compilant with the IEEE standard for rounding. If it returns 1 or 4, then it is doing some kind of rounding, but not the IEEE standard. If
irndreturns 0 or 3, then it is truncating the result, not rounding it.
ngrd-- Is the number of
'guard digits'used when truncating the ploduct of two mantissas to fit the representationThis is taken from "NUMERICAL RECIPES in C", second edition, Reprinted 1996.