math: new software sqrtl
authorSzabolcs Nagy <nsz@port70.net>
Sun, 14 Jun 2020 13:41:21 +0000 (13:41 +0000)
committerRich Felker <dalias@aerifal.cx>
Thu, 6 Aug 2020 03:06:01 +0000 (23:06 -0400)
commit933f8e72ebbe3a456acd24eb1c910980e6c6ef91
tree86bde0b570552f764b28106770e09d61095a6048
parent4f893997e4738faf6dde8320b304298340f51cd2
math: new software sqrtl

same approach as in sqrt.

sqrtl was broken on aarch64, riscv64 and s390x targets because
of missing quad precision support and on m68k-sf because of
missing ld80 sqrtl.

this implementation is written for quad precision and then
edited to make it work for both m68k and x86 style ld80 formats
too, but it is not expected to be optimal for them.

note: using fp instructions for the initial estimate when such
instructions are available (e.g. double prec sqrt or rsqrt) is
avoided because of fenv correctness.
src/math/sqrtl.c