MCPcopy Index your code
hub / github.com/python/cpython / harrison_ulp

Method harrison_ulp

Modules/_decimal/tests/deccheck.py:402–406  ·  view source on GitHub ↗

ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-5504.pdf

(self, dec)

Source from the content-addressed store, hash-verified

400 __reduce__ = __format__ = __repr__ = __str__ = default
401
402 def harrison_ulp(self, dec):
403 """ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-5504.pdf"""
404 a = dec.next_plus()
405 b = dec.next_minus()
406 return abs(a - b)
407
408 def standard_ulp(self, dec, prec):
409 return _dec_from_triple(0, '1', dec._exp+len(dec._int)-prec)

Callers 1

check_ulpdiffMethod · 0.95

Calls 3

absFunction · 0.85
next_plusMethod · 0.45
next_minusMethod · 0.45

Tested by

no test coverage detected