MCPcopy
hub / github.com/numpy/numpy / finfo

Class finfo

numpy/_core/getlimits.py:58–342  ·  view source on GitHub ↗

finfo(dtype) Machine limits for floating point types. Attributes ---------- bits : int The number of bits occupied by the type. dtype : dtype Returns the dtype for which `finfo` returns information. For complex input, the returned dtype is the assoc

Source from the content-addressed store, hash-verified

56
57@set_module('numpy')
58class finfo:
59 """
60 finfo(dtype)
61
62 Machine limits for floating point types.
63
64 Attributes
65 ----------
66 bits : int
67 The number of bits occupied by the type.
68 dtype : dtype
69 Returns the dtype for which `finfo` returns information. For complex
70 input, the returned dtype is the associated ``float*`` dtype for its
71 real and complex components.
72 eps : float
73 The difference between 1.0 and the next smallest representable float
74 larger than 1.0. For example, for 64-bit binary floats in the IEEE-754
75 standard, ``eps = 2**-52``, approximately 2.22e-16.
76 epsneg : float
77 The difference between 1.0 and the next smallest representable float
78 less than 1.0. For example, for 64-bit binary floats in the IEEE-754
79 standard, ``epsneg = 2**-53``, approximately 1.11e-16.
80 iexp : int
81 The number of bits in the exponent portion of the floating point
82 representation.
83 machep : int
84 The exponent that yields `eps`.
85 max : floating point number of the appropriate type
86 The largest representable number.
87 maxexp : int
88 The smallest positive power of the base (2) that causes overflow.
89 Corresponds to the C standard MAX_EXP.
90 min : floating point number of the appropriate type
91 The smallest representable number, typically ``-max``.
92 minexp : int
93 The most negative power of the base (2) consistent with there
94 being no leading 0's in the mantissa. Corresponds to the C
95 standard MIN_EXP - 1.
96 negep : int
97 The exponent that yields `epsneg`.
98 nexp : int
99 The number of bits in the exponent including its sign and bias.
100 nmant : int
101 The number of explicit bits in the mantissa (excluding the implicit
102 leading bit for normalized numbers).
103 precision : int
104 The approximate number of decimal digits to which this kind of
105 float is precise.
106 resolution : floating point number of the appropriate type
107 The approximate decimal resolution of this type, i.e.,
108 ``10**-precision``.
109 tiny : float
110 An alias for `smallest_normal`, kept for backwards compatibility.
111 smallest_normal : float
112 The smallest positive floating point number with 1 as leading bit in
113 the mantissa following IEEE-754 (see Notes).
114 smallest_subnormal : float
115 The smallest positive floating point number with 0 as leading bit in

Callers 12

test_singletonMethod · 0.90
test_singletonMethod · 0.90
test_singletonMethod · 0.90
test_singletonMethod · 0.90
test_singletonMethod · 0.90
test_basicMethod · 0.90
test_instancesFunction · 0.90
test_subnormal_warningFunction · 0.90
polyfitFunction · 0.90
matrix_rankFunction · 0.90
pinvFunction · 0.90
lstsqFunction · 0.90

Calls

no outgoing calls

Tested by 8

test_singletonMethod · 0.72
test_singletonMethod · 0.72
test_singletonMethod · 0.72
test_singletonMethod · 0.72
test_singletonMethod · 0.72
test_basicMethod · 0.72
test_instancesFunction · 0.72
test_subnormal_warningFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…