newlib-cygwin/winsup/cygwin/math
Corinna Vinschen 183e5f0a15 Cygwin: take hypotl function from Mingw-w64
The simple newlib hypotl for real long double architectures is too
simple at this point.  It's implemented as a real call to sqrtl(x^2+y^2).
This has a fatal tendency to overflow for big input numbers.  Hypotl
isn't supposed to do that if the result would still be valid in range of
long double.

Given the complexity of implementing hypotl for various architectures,
we just take the hypotl function from Mingw-w64, which is in the public
domain.

Even though this hypotl is an architecture-independent implementation,
we can't use it for newlib yet, unfortunately, because it requires logbl
under the hood.  Logbl is yet another function missing in newlib for
real long double architectures.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-04-19 12:39:30 +02:00
..
DISCLAIMER.PD
acosh.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
acoshl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
acosl.c Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
asinhl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
asinl.c Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
atan2l.c Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
atanhl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
atanl.c Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
cabs.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cabsl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cacos.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cacosh.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cacosl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
carg.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cargl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
casin.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
casinh.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
casinl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
catan.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
catanh.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
catanl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cbrtl.c
ccos.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
ccosh.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
ccosl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
ceil.S
ceilf.S
ceill.S
cephes_emath.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cephes_emath.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cephes_mconf.h
cexp.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cexpl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cimag.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cimagl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
clog.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
clog10.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
clog10l.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
clogl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
complex_internal.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
conj.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
conjl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
copysignl.S
cos.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
coshl.c Cygwin: math: Fix cosh(-INFINITY) to return +INFINITY 2019-08-20 18:15:16 +02:00
cosl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cosl_internal.S
cossin.c
cpow.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cpowl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cproj.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
cprojl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
creal.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
creall.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
csin.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
csinh.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
csinl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
csqrt.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
csqrtl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
ctan.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
ctanh.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
ctanl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
erfl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
exp.def.h Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
exp2.S Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
exp2l.S Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
exp10l.c
expl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
expm1.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
expm1l.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
fabsl.c Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
fastmath.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
fdiml.c
finite.c
floorl.S
fmal.c
fmaxl.c
fminl.c
fmodl.c Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
frexpl.S Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
hypotl.c Cygwin: take hypotl function from Mingw-w64 2021-04-19 12:39:30 +02:00
ilogbl.S Cygwin: ilogbl: Make sure to return FP_ILGB0 on zero input 2019-12-16 10:50:17 +01:00
internal_logl.S
isinf.c newlib: remove __infinity{f,ld} constants 2017-04-18 12:17:26 +02:00
isnan.c
ldexpl.c Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
lgammal.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
llrint.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
llrintf.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
llrintl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
llroundl.c
log.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
log1pl.S
log2l.S
log10l.S
logbl.c Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
logl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
lrint.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
lrintf.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
lrintl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
lroundl.c
modfl.c Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
nearbyint.S
nearbyintf.S
nearbyintl.S
nextafterl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
nexttoward.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
nexttowardf.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
pow.def.h Cygwin: crt: Add "volatile" to all inline assembly snippets under math 2020-08-30 14:27:43 +02:00
pow10l.c
powi.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
powil.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
powl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
remainder.S
remainderf.S
remainderl.S
remquol.S Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
rint.c
rintf.c
rintl.c
roundl.c
scalbl.S
scalbnl.S
sin.def.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
sinhl.c
sinl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
sinl_internal.S
sqrt.def.h Cygwin: fix return value of sqrtl on negative infinity 2020-10-27 10:23:27 -04:00
sqrtl.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
tanhl.c
tanl.S
tgammal.c Cygwin: math: Properly propagate input NANs in a few functions 2019-08-20 18:15:16 +02:00
truncl.c