Patches for s_expl.c
Steve Kargl
sgk at troutmask.apl.washington.edu
Tue May 28 17:37:10 UTC 2013
On Tue, May 28, 2013 at 10:22:42AM -0700, Steve Kargl wrote:
> Here are two patches for ld80/s_expl.c and ld128/s_expl.c.
> Instead of committing the one large patch that I have spent
> hours testing, I have split it into two. One patch fixes/updates
> expl(). The other patch is the implementation of expm1l().
I forgot to send the 3rd patch, which updates documentations,
deals with 53-bit long double targets, and math.h. Yes, there
is some cruft in the diff, which I'll disentangle when I do
the commit.
--
steve
Index: Symbol.map
===================================================================
--- Symbol.map (revision 251062)
+++ Symbol.map (working copy)
@@ -250,4 +250,7 @@
ctanh;
ctanhf;
expl;
+ expm1l;
+ logl;
+ sincos;
};
Index: man/exp.3
===================================================================
--- man/exp.3 (revision 251062)
+++ man/exp.3 (working copy)
@@ -41,6 +41,7 @@
.Nm exp2l ,
.Nm expm1 ,
.Nm expm1f ,
+.Nm expm1l ,
.Nm pow ,
.Nm powf
.Nd exponential and power functions
@@ -64,6 +65,8 @@
.Fn expm1 "double x"
.Ft float
.Fn expm1f "float x"
+.Ft long double
+.Fn expm1l "long double x"
.Ft double
.Fn pow "double x" "double y"
.Ft float
@@ -88,9 +91,10 @@
.Fa x .
.Pp
The
-.Fn expm1
-and the
-.Fn expm1f
+.Fn expm1 ,
+.Fn expm1f ,
+and
+.Fn expm1l
functions compute the value exp(x)\-1 accurately even for tiny argument
.Fa x .
.Pp
Index: src/math.h
===================================================================
--- src/math.h (revision 251062)
+++ src/math.h (working copy)
@@ -405,6 +405,7 @@
long double cosl(long double);
long double exp2l(long double);
long double expl(long double);
+long double expm1l(long double);
long double fabsl(long double) __pure2;
long double fdiml(long double, long double);
long double floorl(long double);
@@ -419,6 +420,7 @@
long long llrintl(long double);
long long llroundl(long double);
long double logbl(long double);
+long double logl(long double);
long lrintl(long double);
long lroundl(long double);
long double modfl(long double, long double *); /* fundamentally !__pure2 */
@@ -440,6 +442,11 @@
long double truncl(long double);
#endif /* __ISO_C_VISIBLE >= 1999 */
+
+#if __BSD_VISIBLE
+void sincos(double, double *, double *);
+#endif /* __BSD_VISIBLE */
+
__END_DECLS
#endif /* !_MATH_H_ */
@@ -462,12 +469,10 @@
long double coshl(long double);
long double erfcl(long double);
long double erfl(long double);
-long double expm1l(long double);
long double lgammal(long double);
long double log10l(long double);
long double log1pl(long double);
long double log2l(long double);
-long double logl(long double);
long double powl(long double, long double);
long double sinhl(long double);
long double tanhl(long double);
Index: src/s_expm1.c
===================================================================
--- src/s_expm1.c (revision 251062)
+++ src/s_expm1.c (working copy)
@@ -216,3 +216,7 @@
}
return y;
}
+
+#if (LDBL_MANT_DIG == 53)
+__weak_reference(expm1, expm1l);
+#endif
More information about the freebsd-numerics
mailing list