Description
Describe the issue:
At conda-forge, on the numba
feedstock we encountered a regression for glibc=2.17 via numba
's test suite.
See conda-forge/numba-feedstock#128 (comment) .
Essentially, for 1.26.0
, arctanh(-i) gives a "positive zero" real part -- consistent with what catanh
from glibc=2.17, but different from NumPy's own implementation and catanh
from glibc>2.17.
I tracked that down to be related to builds via meson
, i.e., the current 1.26
but also 1.25
show the same behavior if built via meson
.
I don't know why the meson
-based builds show that behavior.
As expected by the observed behavior, one can see that the extension modules link to glibc's versions (not just catanh
, but that is our example here):
readelf --dyn-syms 'numpy/linalg/_umath_linalg.cpython-311-x86_64-linux-gnu.so' | grep -o '[^ ]*catanh[^ ]*'
:
- for
with_meson == "yes"
:catanhf@GLIBC_2.2.5 catanh@GLIBC_2.2.5 catanhl@GLIBC_2.2.5 npy_catanh npy_catanhf npy_catanhl
- for
with_meson == "no"
:npy_catanh npy_catanhf npy_catanhl
For further details see
- conda-forge/numba-feedstock#128 (comment)
- conda-forge/numpy-feedstock#304 (comment)
Reproduce the code example:
import numpy as np
assert np.signbit(np.arctanh(-1j).real)
Error message:
No response
Runtime information:
[{'numpy_version': '1.26.0',
'python': '3.11.6 | packaged by conda-forge | (main, Oct 3 2023, 10:40:35) '
'[GCC 12.3.0]',
'uname': uname_result(system='Linux', node='20df351fb29c', release='6.1.55-1-MANJARO', version='#1 SMP PREEMPT_DYNAMIC Sat Sep 23 12:13:56 UTC 2023', machine='x86_64')},
{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2'],
'not_found': ['AVX512F',
'AVX512CD',
'AVX512_KNL',
'AVX512_KNM',
'AVX512_SKX',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL',
'AVX512_SPR']}}]
None
Context for the issue:
The regression caused inconsistent behavior in numba
's test suite:
- conda-forge/numba-feedstock#128 (comment)
I did not investigate which other functions and/or use cases are affected.
Builds with/without using meson
can be retrieved for further inspected at
- https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=819015&view=artifacts&pathAsName=false&type=publishedArtifacts