gcc/libquadmath/math
Jakub Jelinek 481ba4fb5f libquadmath: Use soft-fp for sqrtq finite positive arguments [PR114623]
sqrt should be 0.5ulp precise, but the current implementation is less
precise than that.
The following patch uses the soft-fp code (like e.g. glibc for x86) for it
if possible.  I didn't want to replicate the libgcc infrastructure for
choosing the right sfp-machine.h, so the patch just uses a single generic
implementation.  As the code is used solely for the finite positive arguments,
it shouldn't generate NaNs (so the exact form of canonical QNaN/SNaN is
irrelevant), and sqrt for these shouldn't produce underflows/overflows either,
for < 1.0 arguments it always returns larger values than the argument and for
> 1.0 smaller values than the argument.

2024-04-09  Jakub Jelinek  <jakub@redhat.com>

	PR libquadmath/114623
	* sfp-machine.h: New file.
	* math/sqrtq.c: Include from libgcc/soft-fp also soft-fp.h and quad.h
	if possible.
	(USE_SOFT_FP): Define in that case.
	(sqrtq): Use soft-fp based implementation for the finite positive
	arguments if possible.
2024-04-09 08:17:25 +02:00
..
acoshq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
acosq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
asinhq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
asinq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
atan2q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
atanhq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
atanq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
cacoshq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
cacosq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
casinhq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
casinhq_kernel.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
casinq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
catanhq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
catanq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
cbrtq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
ccoshq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
ceilq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
cexpq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
cimagq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
clog10q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
clogq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
complex.c
conjq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
copysignq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
coshq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
cosq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
cosq_kernel.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
cprojq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
crealq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
csinhq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
csinq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
csqrtq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
ctanhq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
ctanq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
erfq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
exp2q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
expm1q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
expq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
expq_table.h Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
fabsq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
fdimq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
finiteq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
floorq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
fmaq.c Update libquadmath fmaq from glibc, fix nanq issues. 2018-11-07 13:49:03 +00:00
fmaxq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
fminq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
fmodq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
frexpq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
hypotq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
ilogbq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
isinfq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
isnanq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
issignalingq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
j0q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
j1q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
jnq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
ldexpq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
lgammaq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
lgammaq_neg.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
lgammaq_product.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
llrintq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
llroundq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
log1pq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
log2q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
log10q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
logbq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
logq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
lrintq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
lroundq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
modfq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
nanq.c Update libquadmath fmaq from glibc, fix nanq issues. 2018-11-07 13:49:03 +00:00
nearbyintq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
nextafterq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
powq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
rem_pio2q.c re PR libquadmath/65757 (gfortran gives incorrect result for anint with real*16 argument) 2017-07-19 15:12:58 +02:00
remainderq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
remquoq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
rintq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
roundq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
scalblnq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
scalbnq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
signbitq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
sincos_table.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
sincosq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
sincosq_kernel.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
sinhq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
sinq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
sinq_kernel.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
sqrtq.c libquadmath: Use soft-fp for sqrtq finite positive arguments [PR114623] 2024-04-09 08:17:25 +02:00
tanhq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
tanq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
tanq_kernel.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
tgammaq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
tgammaq_product.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
truncq.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00
x2y2m1q.c Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). 2018-11-05 23:03:55 +00:00