New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/44529#issuecomment-1599471459 Comment: musl is this single failure: ``` 2023-06-20T02:42:42.2859874Z ___________________ TestComplexFunctions.test_against_cmath ____________________ 2023-06-20T02:42:42.2860557Z [gw1] linux -- Python 3.11.4 /usr/bin/python3 2023-06-20T02:42:42.2919785Z 2023-06-20T02:42:42.2922623Z self = 2023-06-20T02:42:42.2925068Z 2023-06-20T02:42:42.2927330Z def test_against_cmath(self): 2023-06-20T02:42:42.2929736Z import cmath 2023-06-20T02:42:42.2932080Z 2023-06-20T02:42:42.2934650Z points = [-1-1j, -1+1j, +1-1j, +1+1j] 2023-06-20T02:42:42.2937220Z name_map = {'arcsin': 'asin', 'arccos': 'acos', 'arctan': 'atan', 2023-06-20T02:42:42.2940138Z 'arcsinh': 'asinh', 'arccosh': 'acosh', 'arctanh': 'atanh'} 2023-06-20T02:42:42.2942626Z atol = 4*np.finfo(complex).eps 2023-06-20T02:42:42.2945045Z for func in self.funcs: 2023-06-20T02:42:42.2947527Z fname = func.__name__.split('.')[-1] 2023-06-20T02:42:42.2950099Z cname = name_map.get(fname, fname) 2023-06-20T02:42:42.2952604Z try: 2023-06-20T02:42:42.2954975Z cfunc = getattr(cmath, cname) 2023-06-20T02:42:42.2957354Z except AttributeError: 2023-06-20T02:42:42.2959699Z continue 2023-06-20T02:42:42.2962246Z for p in points: 2023-06-20T02:42:42.2964704Z a = complex(func(np.complex_(p))) 2023-06-20T02:42:42.2967207Z b = cfunc(p) 2023-06-20T02:42:42.2969730Z > assert_(abs(a - b) < atol, "%s %s: %s; cmath: %s" % (fname, p, a, b)) 2023-06-20T02:42:42.2972367Z E AssertionError: arccosh (-1-1j): (-1.0612750619050357+2.2370357592874117j); cmath: (1.0612750619050357-2.237035759287412j) 2023-06-20T02:42:42.2974705Z 2023-06-20T02:42:42.2976981Z a = (-1.0612750619050357+2.2370357592874117j) 2023-06-20T02:42:42.2979401Z atol = 8.881784197001252e-16 2023-06-20T02:42:42.2981835Z b = (1.0612750619050357-2.237035759287412j) 2023-06-20T02:42:42.2984234Z cfunc = 2023-06-20T02:42:42.2986844Z cmath = 2023-06-20T02:42:42.2989329Z cname = 'acosh' 2023-06-20T02:42:42.2991685Z fname = 'arccosh' 2023-06-20T02:42:42.2992415Z func = 2023-06-20T02:42:42.2993001Z name_map = {'arccos': 'acos', 'arccosh': 'acosh', 'arcsin': 'asin', 'arcsinh': 'asinh', ...} 2023-06-20T02:42:42.2993512Z p = (-1-1j) 2023-06-20T02:42:42.2993981Z points = [(-1-1j), (-1+1j), (1-1j), (1+1j)] 2023-06-20T02:42:42.2994496Z self = 2023-06-20T02:42:42.2994903Z 2023-06-20T02:42:42.2995196Z numpy/core/tests/test_umath.py:4161: AssertionError ``` Can reproduce with: ``` $ python -c 'import cmath, numpy; print(cmath.acosh(-1-1j),numpy.arccosh(-1-1j))' (1.0612750619050357-2.237035759287412j) (-1.0612750619050357+2.2370357592874117j) ``` Indeed this is "incorrect" since it should choose a branch with positive real part (i.e `cmath` output is ok, `numpy` output is incorrect). Note this is also wrong in the 1.24.3 that is in void repo (but only on musl).