@@ -27,12 +27,17 @@ def on_powerpc():
27
27
28
28
29
29
def bad_arcsinh ():
30
- """The blocklisted trig functions are not accurate on aarch64 for
30
+ """The blocklisted trig functions are not accurate on aarch64/PPC for
31
31
complex256. Rather than dig through the actual problem skip the
32
32
test. This should be fixed when we can move past glibc2.17
33
33
which is the version in manylinux2014
34
34
"""
35
- x = 1.78e-10
35
+ if platform .machine () == 'aarch64' :
36
+ x = 1.78e-10
37
+ elif on_powerpc ():
38
+ x = 2.16e-10
39
+ else :
40
+ return False
36
41
v1 = np .arcsinh (np .float128 (x ))
37
42
v2 = np .arcsinh (np .complex256 (x )).real
38
43
# The eps for float128 is 1-e33, so this is way bigger
@@ -3515,10 +3520,10 @@ def check(x, rtol):
3515
3520
x_basic = np .logspace (- 2.999 , 0 , 10 , endpoint = False )
3516
3521
3517
3522
if dtype is np .longcomplex :
3518
- if ( platform . machine () == 'aarch64' and bad_arcsinh () ):
3523
+ if bad_arcsinh ():
3519
3524
pytest .skip ("Trig functions of np.longcomplex values known "
3520
- "to be inaccurate on aarch64 for some compilation "
3521
- "configurations." )
3525
+ "to be inaccurate on aarch64 and PPC for some "
3526
+ "compilation configurations." )
3522
3527
# It's not guaranteed that the system-provided arc functions
3523
3528
# are accurate down to a few epsilons. (Eg. on Linux 64-bit)
3524
3529
# So, give more leeway for long complex tests here:
0 commit comments