diff options
| author | Joseph Myers <josmyers@redhat.com> | 2025-03-07 19:15:26 +0000 |
|---|---|---|
| committer | Joseph Myers <josmyers@redhat.com> | 2025-03-07 19:15:26 +0000 |
| commit | 77261698b4e938020a1b2032709a54d942ba330f (patch) | |
| tree | 6d7b1dd547ad3ed168503f308f627327a4f69b89 /math/tgmath.h | |
| parent | ee3b1d15da412be19583085f81c220653b270c1f (diff) | |
| download | glibc-77261698b4e938020a1b2032709a54d942ba330f.tar.xz glibc-77261698b4e938020a1b2032709a54d942ba330f.zip | |
Implement C23 rsqrt
C23 adds various <math.h> function families originally defined in TS
18661-4. Add the rsqrt functions (1/sqrt(x)). The test inputs are
taken from those for sqrt.
Tested for x86_64 and x86, and with build-many-glibcs.py.
Diffstat (limited to 'math/tgmath.h')
| -rw-r--r-- | math/tgmath.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/math/tgmath.h b/math/tgmath.h index e8e168bca7..6c5480a508 100644 --- a/math/tgmath.h +++ b/math/tgmath.h @@ -923,6 +923,10 @@ /* Return the cube root of X. */ #define cbrt(Val) __TGMATH_UNARY_REAL_ONLY (Val, cbrt) +#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23) +# define rsqrt(Val) __TGMATH_UNARY_REAL_ONLY (Val, rsqrt) +#endif + /* Nearest integer, absolute value, and remainder functions. */ |
