From 92081194d5ba828e1d0944d3987b4b11fdb9136a Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Wed, 30 Apr 2025 09:01:35 +0800 Subject: [PATCH] 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 --- sysdeps/ieee754/dbl-64/e_asin.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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 -- 2.30.2