Method
__init__
(self, dtype, machep, negep, minexp, maxexp, nmant, iexp)
Source from the content-addressed store, hash-verified
| 8 | class MachArLike: |
| 9 | """Minimal class to simulate machine arithmetic parameters.""" |
| 10 | def __init__(self, dtype, machep, negep, minexp, maxexp, nmant, iexp): |
| 11 | self.dtype = dtype |
| 12 | self.machep = machep |
| 13 | self.negep = negep |
| 14 | self.minexp = minexp |
| 15 | self.maxexp = maxexp |
| 16 | self.nmant = nmant |
| 17 | self.iexp = iexp |
| 18 | self.eps = exp2(dtype(-nmant)) |
| 19 | self.epsneg = exp2(dtype(negep)) |
| 20 | self.precision = int(-log10(self.eps)) |
| 21 | self.resolution = dtype(10) ** (-self.precision) |
| 22 | |
| 23 | |
| 24 | @pytest.fixture |
Callers
nothing calls this directly
Tested by
no test coverage detected