From: GNU Libc Maintainers Date: Wed, 30 Apr 2025 01:01:35 +0000 (+0800) Subject: local-asin-acos-raise-invalid X-Git-Tag: archive/raspbian/2.31-13+rpi1+deb11u12^2~53 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=92081194d5ba828e1d0944d3987b4b11fdb9136a;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