summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libm/cephes/Makefile4
-rw-r--r--regress/lib/libm/cephes/constll.c56
-rw-r--r--regress/lib/libm/cephes/polevll.c6
3 files changed, 63 insertions, 3 deletions
diff --git a/regress/lib/libm/cephes/Makefile b/regress/lib/libm/cephes/Makefile
index 97523155e3b..36f9f0a37fb 100644
--- a/regress/lib/libm/cephes/Makefile
+++ b/regress/lib/libm/cephes/Makefile
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile,v 1.1 2011/05/30 20:23:35 martynas Exp $
+# $OpenBSD: Makefile,v 1.2 2011/06/02 21:47:40 martynas Exp $
PROG = cephes
-SRCS = cephes.c const.c monot.c monotl.c monotll.c polevll.c \
+SRCS = cephes.c const.c constll.c monot.c monotl.c monotll.c polevll.c \
testvect.c testvectl.c testvectll.c
LDADD = -lm
DPADD = ${LIBM}
diff --git a/regress/lib/libm/cephes/constll.c b/regress/lib/libm/cephes/constll.c
new file mode 100644
index 00000000000..6b3d936ee0d
--- /dev/null
+++ b/regress/lib/libm/cephes/constll.c
@@ -0,0 +1,56 @@
+/* $OpenBSD: constll.c,v 1.1 2011/06/02 21:47:40 martynas Exp $ */
+
+/*
+ * Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <float.h>
+
+#if LDBL_MANT_DIG == 113
+
+/* (1 - 2^-113) 2^16384 */
+long double MAXNUML = 1.189731495357231765085759326628007016196469e4932L;
+
+/* 2^-113 */
+long double MACHEPL = 9.629649721936179265279889712924636592690508e-35L;
+
+/* (1 + 2^-112) 2^-16382 */
+long double UFTHRESHL = 3.362103143112093506262677817321753250115591e-4932L;
+
+/* 2^-16494 */
+long double MINNUML = 6.475175119438025110924438958227646552499569e-4966L;
+
+/* ln(MAXNUM) */
+long double MAXLOGL = 1.1356523406294143949491931077970764891253E4L;
+
+/* ln(MINNUM) */
+long double MINLOGL = -1.143276959615573793352782661133116431383730e4L;
+
+/* ln(UFTHRESH) */
+/* long double MINLOGL = -1.135513711193302405887309661372784853802025e4L; */
+
+long double PIL = 3.141592653589793238462643383279502884197169L;
+
+long double PIO2L = 1.570796326794896619231321691639751442098585L;
+
+long double PIO4L = 0.7853981633974483096156608458198757210492923L;
+
+long double LOGE2L = 0.6931471805599453094172321214581765680755001L;
+
+long double LOG2EL = 1.442695040888963407359924681001892137426646L;
+
+long double INFINITYL = 1.0L / 0.0L;
+
+#endif /* LDBL_MANT_DIG == 113 */
diff --git a/regress/lib/libm/cephes/polevll.c b/regress/lib/libm/cephes/polevll.c
index 0dff338b2b0..ae8b6b73757 100644
--- a/regress/lib/libm/cephes/polevll.c
+++ b/regress/lib/libm/cephes/polevll.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: polevll.c,v 1.1 2011/05/30 20:23:35 martynas Exp $ */
+/* $OpenBSD: polevll.c,v 1.2 2011/06/02 21:47:40 martynas Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
@@ -70,6 +70,9 @@
*
*/
+#include <float.h>
+
+#if LDBL_MANT_DIG == 64
#include "mconf.h"
#if UNK
@@ -192,3 +195,4 @@ do
while( --n );
return( y );
}
+#endif /* LDBL_MANT_DIG == 64 */