diff options
author | das <das@FreeBSD.org> | 2008-03-02 01:47:58 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2008-03-02 01:47:58 +0000 |
commit | 40c2687372d3787b54f59483b7b4ce8df207403c (patch) | |
tree | ed507bc2a99d9d0bd801a28306c9065543f2f35d /lib/msun/src/e_sqrt.c | |
parent | dd3a7906ab066bb6da5ec7f1fcf0fbe6d1ddc268 (diff) | |
download | FreeBSD-src-40c2687372d3787b54f59483b7b4ce8df207403c.zip FreeBSD-src-40c2687372d3787b54f59483b7b4ce8df207403c.tar.gz |
MI implementation of sqrtl(). This is very slow and should
be overridden when hardware sqrt is available.
Diffstat (limited to 'lib/msun/src/e_sqrt.c')
-rw-r--r-- | lib/msun/src/e_sqrt.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/msun/src/e_sqrt.c b/lib/msun/src/e_sqrt.c index 3b3b2a7..12fb56e 100644 --- a/lib/msun/src/e_sqrt.c +++ b/lib/msun/src/e_sqrt.c @@ -11,9 +11,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); /* __ieee754_sqrt(x) * Return correctly rounded sqrt. @@ -85,6 +84,8 @@ static char rcsid[] = "$FreeBSD$"; *--------------- */ +#include <float.h> + #include "math.h" #include "math_private.h" @@ -187,6 +188,10 @@ __ieee754_sqrt(double x) return z; } +#if (LDBL_MANT_DIG == 53) +__weak_reference(sqrt, sqrtl); +#endif + /* Other methods (use floating-point arithmetic) ------------- |