[PATCH] hypotl, cabsl, and code removal in cabs

David Schultz das at FreeBSD.ORG
Sun Dec 9 13:49:55 PST 2007


On Fri, Dec 07, 2007, Bruce Evans wrote:
> >As to the sqrtl question, I have an implementation that supposely
> >does correct rounding in all rounding modes.  It is restricted to
> >64-bit significand long doubles.  The code does not use bit twiddle;
> >instead, it uses fenv.
> 
> This I haven't looked at closely.  I fear extreme slowness.
[...]
> Anyway, the software version of sqrtl is irrelevant on
> athlon-xp, since athlon-xp has sqrtl in hardware (takes 35 cycles).
> Similarly for amd64, ia64 and possibly sparc64 (sparc64 has sqrt in
> hardware so it hopefully has sqrtl in hardware).  arm and powerpc
> apparently have long double == double, so the software version of sqrtl
> is apparently only needed on ia64.

In general, even if we don't use it on any architectures that
FreeBSD currently supports, I'd like to have a working MI
implementation checked in before we add a bunch of MD
versions. Otherwise we risk overburdening people trying to port
FreeBSD to new architectures. Having an MI version makes
cross-testing easier, too.

In the specific case of sqrt, pretty much everyone who claims to
support IEEE 754 floating point is going to have hardware support
for it, so maybe we can get away with a bunch of MD versions alone
if we have to...

For ia64, we can use Intel's BSD-licensed math lib.


More information about the freebsd-standards mailing list