summaryrefslogtreecommitdiffstats
path: root/lib/libm/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libm/src')
-rw-r--r--lib/libm/src/w_gammaf.c29
-rw-r--r--lib/libm/src/w_gammaf_r.c31
-rw-r--r--lib/libm/src/w_lgamma.c32
-rw-r--r--lib/libm/src/w_lgammaf.c29
4 files changed, 121 insertions, 0 deletions
diff --git a/lib/libm/src/w_gammaf.c b/lib/libm/src/w_gammaf.c
new file mode 100644
index 00000000000..16062edf391
--- /dev/null
+++ b/lib/libm/src/w_gammaf.c
@@ -0,0 +1,29 @@
+/* w_gammaf.c -- float version of w_gamma.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: w_gammaf.c,v 1.4 1995/11/20 22:06:48 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+extern int signgam;
+
+float
+gammaf(float x)
+{
+ return lgammaf_r(x,&signgam);
+}
diff --git a/lib/libm/src/w_gammaf_r.c b/lib/libm/src/w_gammaf_r.c
new file mode 100644
index 00000000000..f1c8bbccfa5
--- /dev/null
+++ b/lib/libm/src/w_gammaf_r.c
@@ -0,0 +1,31 @@
+/* w_gammaf_r.c -- float version of w_gamma_r.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: w_gammaf_r.c,v 1.4 1995/11/20 22:06:50 jtc Exp $";
+#endif
+
+/*
+ * wrapper float gammaf_r(float x, int *signgamp)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+float
+gammaf_r(float x, int *signgamp) /* wrapper lgammaf_r */
+{
+ return lgammaf_r(x,signgamp);
+}
diff --git a/lib/libm/src/w_lgamma.c b/lib/libm/src/w_lgamma.c
new file mode 100644
index 00000000000..f53a6be5dcd
--- /dev/null
+++ b/lib/libm/src/w_lgamma.c
@@ -0,0 +1,32 @@
+/* @(#)w_lgamma.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $";
+#endif
+
+/* double lgamma(double x)
+ * Return the logarithm of the Gamma function of x.
+ *
+ * Method: call lgamma_r
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+extern int signgam;
+
+double
+lgamma(double x)
+{
+ return lgamma_r(x,&signgam);
+}
diff --git a/lib/libm/src/w_lgammaf.c b/lib/libm/src/w_lgammaf.c
new file mode 100644
index 00000000000..0153f2bb5af
--- /dev/null
+++ b/lib/libm/src/w_lgammaf.c
@@ -0,0 +1,29 @@
+/* w_lgammaf.c -- float version of w_lgamma.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: w_lgammaf.c,v 1.3 1995/05/10 20:49:30 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+extern int signgam;
+
+float
+lgammaf(float x)
+{
+ return lgammaf_r(x,&signgam);
+}