MCPcopy Create free account
hub / github.com/numpy/numpy / bad_arcsinh

Function bad_arcsinh

numpy/core/tests/test_umath.py:104–119  ·  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

102
103
104def bad_arcsinh():
105 """The blocklisted trig functions are not accurate on aarch64/PPC for
106 complex256. Rather than dig through the actual problem skip the
107 test. This should be fixed when we can move past glibc2.17
108 which is the version in manylinux2014
109 """
110 if platform.machine() == 'aarch64':
111 x = 1.78e-10
112 elif on_powerpc():
113 x = 2.16e-10
114 else:
115 return False
116 v1 = np.arcsinh(np.float128(x))
117 v2 = np.arcsinh(np.complex256(x)).real
118 # The eps for float128 is 1-e33, so this is way bigger
119 return abs((v1 / v2) - 1.0) > 1e-23
120
121
122class _FilterInvalids:

Callers 1

Calls 2

on_powerpcFunction · 0.85
absFunction · 0.85

Tested by

no test coverage detected