MCPcopy Index your code
hub / github.com/numpy/numpy / bad_arcsinh

Function bad_arcsinh

numpy/_core/tests/test_umath.py:118–133  ·  view source on GitHub ↗

The blocklisted trig functions are not accurate on aarch64/PPC for complex256. Rather than dig through the actual problem skip the test. This should be fixed when we can move past glibc2.17 which is the version in manylinux2014

()

Source from the content-addressed store, hash-verified

116
117
118def bad_arcsinh():
119 """The blocklisted trig functions are not accurate on aarch64/PPC for
120 complex256. Rather than dig through the actual problem skip the
121 test. This should be fixed when we can move past glibc2.17
122 which is the version in manylinux2014
123 """
124 if platform.machine() == 'aarch64':
125 x = 1.78e-10
126 elif on_powerpc():
127 x = 2.16e-10
128 else:
129 return False
130 v1 = np.arcsinh(np.float128(x))
131 v2 = np.arcsinh(np.complex256(x)).real
132 # The eps for float128 is 1-e33, so this is way bigger
133 return abs((v1 / v2) - 1.0) > 1e-23
134
135
136class _FilterInvalids:

Callers 1

Calls 1

on_powerpcFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…