summaryrefslogtreecommitdiffstats
path: root/lib/msun/src
diff options
context:
space:
mode:
authorkargl <kargl@FreeBSD.org>2014-07-13 17:05:03 +0000
committerkargl <kargl@FreeBSD.org>2014-07-13 17:05:03 +0000
commitff0ae31edc6589f375df7ded486f97d06caaa8e9 (patch)
treeb7d8901b7e598886d5c7e802684110b98652231e /lib/msun/src
parent1c51afe84c8e7ee057d192f3ac03b0de8decf044 (diff)
downloadFreeBSD-src-ff0ae31edc6589f375df7ded486f97d06caaa8e9.zip
FreeBSD-src-ff0ae31edc6589f375df7ded486f97d06caaa8e9.tar.gz
* Makefile:
. Add s_erfl.c to building libm. . Add MLINKS for erfl.3 and erfcl.3. * Symbol.map: . Move erfl and erfcl to their proper location. * ld128/s_erfl.c: . Implementations of erfl and erfcl in the IEEE 754 128-bit format. * ld80/s_erfl.c: . Implementations of erfl and erfcl in the Intel 80-bit format. * man/erf.3: . Document the new functions. . While here, remove an incomplete sentence. * src/imprecise.c: . Remove the stupidity of mapping erfl and erfcl to erf and erfc. * src/math.h: . Move the declarations of erfl and erfcl to their proper place. * src/s_erf.c: . For architectures where double and long double are the same floating point format, use weak references to map erfl to erf and ercl to erfc. Reviewed by: bde (many earlier versions)
Diffstat (limited to 'lib/msun/src')
-rw-r--r--lib/msun/src/imprecise.c2
-rw-r--r--lib/msun/src/math.h4
-rw-r--r--lib/msun/src/s_erf.c8
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/msun/src/imprecise.c b/lib/msun/src/imprecise.c
index 5bd3d64..92fb2d0 100644
--- a/lib/msun/src/imprecise.c
+++ b/lib/msun/src/imprecise.c
@@ -60,7 +60,5 @@ DECLARE_WEAK(powl);
long double imprecise_ ## f ## l(long double v) { return f(v); }\
DECLARE_WEAK(f ## l)
-DECLARE_IMPRECISE(erfc);
-DECLARE_IMPRECISE(erf);
DECLARE_IMPRECISE(lgamma);
DECLARE_IMPRECISE(tgamma);
diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h
index 0c6b704..32d01da 100644
--- a/lib/msun/src/math.h
+++ b/lib/msun/src/math.h
@@ -449,6 +449,8 @@ long double ceill(long double);
long double copysignl(long double, long double) __pure2;
long double coshl(long double);
long double cosl(long double);
+long double erfcl(long double);
+long double erfl(long double);
long double exp2l(long double);
long double expl(long double);
long double expm1l(long double);
@@ -509,8 +511,6 @@ __END_DECLS
*/
__BEGIN_DECLS
-long double erfcl(long double);
-long double erfl(long double);
long double lgammal(long double);
long double powl(long double, long double);
long double tgammal(long double);
diff --git a/lib/msun/src/s_erf.c b/lib/msun/src/s_erf.c
index 910951b..e1d63bc 100644
--- a/lib/msun/src/s_erf.c
+++ b/lib/msun/src/s_erf.c
@@ -242,6 +242,10 @@ erf(double x)
if(hx>=0) return one-r/x; else return r/x-one;
}
+#if (LDBL_MANT_DIG == 53)
+__weak_reference(erf, erfl);
+#endif
+
double
erfc(double x)
{
@@ -299,3 +303,7 @@ erfc(double x)
if(hx>0) return tiny*tiny; else return two-tiny;
}
}
+
+#if (LDBL_MANT_DIG == 53)
+__weak_reference(erfc, erfcl);
+#endif
OpenPOWER on IntegriCloud