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
acosq.c
asinhq.c
asinq.c
atan2q.c
atanhq.c
atanq.c
cacoshq.c
cacosq.c
casinhq_kernel.c
casinhq.c
casinq.c
catanhq.c
catanq.c
cbrtq.c
ccoshq.c
ceilq.c
cexpq.c
cimagq.c
clog10q.c
clogq.c
complex.c
conjq.c
copysignq.c
coshq.c
cosq_kernel.c
cosq.c
cprojq.c
crealq.c
csinhq.c
csinq.c
csqrtq.c
ctanhq.c
ctanq.c
erfq.c
exp2q.c
expm1q.c
expq_table.h
expq.c
fabsq.c
fdimq.c
finiteq.c
floorq.c
fmaq.c
fmaxq.c
fminq.c
fmodq.c
frexpq.c
hypotq.c
ilogbq.c
isinfq.c
isnanq.c
issignalingq.c
j0q.c
j1q.c
jnq.c
ldexpq.c
lgammaq_neg.c
lgammaq_product.c
lgammaq.c
llrintq.c
llroundq.c
log1pq.c
log2q.c
log10q.c
logbq.c
logq.c
lrintq.c
lroundq.c
modfq.c
nanq.c
nearbyintq.c
nextafterq.c
powq.c
rem_pio2q.c
remainderq.c
remquoq.c
rintq.c
roundq.c
scalblnq.c
scalbnq.c
signbitq.c
sincos_table.c
sincosq_kernel.c
sincosq.c
sinhq.c
sinq_kernel.c
sinq.c
sqrtq.c
tanhq.c
tanq_kernel.c
tanq.c
tgammaq_product.c
tgammaq.c
truncq.c
x2y2m1q.c