From: GNU Libc Maintainers Date: Thu, 15 Feb 2024 22:29:51 +0000 (+0000) Subject: local-asin-acos-raise-invalid X-Git-Tag: archive/raspbian/2.31-13+rpi1+deb11u10~52 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1a4ab704e09bb5d5d290a73791cd4a1f7f363af7;p=glibc.git local-asin-acos-raise-invalid This workarounds GCC bug PR 95115 introduced in GCC 10. This is similar to what is done in the float version. Gbp-Pq: Topic riscv64 Gbp-Pq: Name local-asin-acos-raise-invalid.diff --- diff --git a/sysdeps/ieee754/dbl-64/e_asin.c b/sysdeps/ieee754/dbl-64/e_asin.c index eac3d27fd..6f4a3f8b4 100644 --- a/sysdeps/ieee754/dbl-64/e_asin.c +++ b/sysdeps/ieee754/dbl-64/e_asin.c @@ -327,11 +327,7 @@ __ieee754_asin(double x){ else if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x + x; else { - u.i[HIGH_HALF]=0x7ff00000; - v.i[HIGH_HALF]=0x7ff00000; - u.i[LOW_HALF]=0; - v.i[LOW_HALF]=0; - return u.x/v.x; /* NaN */ + return (x-x)/(x-x); /* NaN */ } } #ifndef __ieee754_asin @@ -637,11 +633,7 @@ __ieee754_acos(double x) else if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x + x; else { - u.i[HIGH_HALF]=0x7ff00000; - v.i[HIGH_HALF]=0x7ff00000; - u.i[LOW_HALF]=0; - v.i[LOW_HALF]=0; - return u.x/v.x; + return (x-x)/(x-x); } } #ifndef __ieee754_acos