Module Name:    src
Committed By:   jakllsch
Date:           Sun Jan  9 02:32:13 UTC 2011

Modified Files:
        src/lib/libm: Makefile
Added Files:
        src/lib/libm/noieee_src: n_fmax.c n_fmaxf.c n_fmin.c n_fminf.c

Log Message:
Imlementations of fmax, fmaxf, fmin and fminf libm functions for VAX.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libm/noieee_src/n_fmax.c \
    src/lib/libm/noieee_src/n_fmaxf.c src/lib/libm/noieee_src/n_fmin.c \
    src/lib/libm/noieee_src/n_fminf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.99 src/lib/libm/Makefile:1.100
--- src/lib/libm/Makefile:1.99	Thu Dec  9 22:52:59 2010
+++ src/lib/libm/Makefile	Sun Jan  9 02:32:13 2011
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.99 2010/12/09 22:52:59 abs Exp $
+#  $NetBSD: Makefile,v 1.100 2011/01/09 02:32:13 jakllsch Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -163,7 +163,8 @@
 	n_lgamma.c n_j0.c n_j1.c n_jn.c n_log.c n_log10.c n_log1p.c \
 	n_log__L.c n_pow.c n_sinh.c n_tanh.c \
 	n_sincos.c n_tan.c \
-	n_round.c n_roundf.c n_lround.c n_lroundf.c
+	n_round.c n_roundf.c n_lround.c n_lroundf.c \
+	n_fmax.c n_fmaxf.c n_fmin.c n_fminf.c
 #	n_sqrt.c n_argred.c n_infnan.c n_atan2.c n_cabs.c n_cbrt.c n_support.c
 
 

Added files:

Index: src/lib/libm/noieee_src/n_fmax.c
diff -u /dev/null src/lib/libm/noieee_src/n_fmax.c:1.1
--- /dev/null	Sun Jan  9 02:32:13 2011
+++ src/lib/libm/noieee_src/n_fmax.c	Sun Jan  9 02:32:13 2011
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011 Jonathan A. Kollasch
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBM_SCCS) && !defined(lint)
+__RCSID("$NetBSD: n_fmax.c,v 1.1 2011/01/09 02:32:13 jakllsch Exp $");
+#endif
+
+#include <math.h>
+
+double
+fmax(double x, double y)
+{
+	return x > y ? x : y;
+}
Index: src/lib/libm/noieee_src/n_fmaxf.c
diff -u /dev/null src/lib/libm/noieee_src/n_fmaxf.c:1.1
--- /dev/null	Sun Jan  9 02:32:13 2011
+++ src/lib/libm/noieee_src/n_fmaxf.c	Sun Jan  9 02:32:13 2011
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011 Jonathan A. Kollasch
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBM_SCCS) && !defined(lint)
+__RCSID("$NetBSD: n_fmaxf.c,v 1.1 2011/01/09 02:32:13 jakllsch Exp $");
+#endif
+
+#include <math.h>
+
+float
+fmaxf(float x, float y)
+{
+	return x > y ? x : y;
+}
Index: src/lib/libm/noieee_src/n_fmin.c
diff -u /dev/null src/lib/libm/noieee_src/n_fmin.c:1.1
--- /dev/null	Sun Jan  9 02:32:13 2011
+++ src/lib/libm/noieee_src/n_fmin.c	Sun Jan  9 02:32:13 2011
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011 Jonathan A. Kollasch
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBM_SCCS) && !defined(lint)
+__RCSID("$NetBSD: n_fmin.c,v 1.1 2011/01/09 02:32:13 jakllsch Exp $");
+#endif
+
+#include <math.h>
+
+double
+fmin(double x, double y)
+{
+	return x < y ? x : y;
+}
Index: src/lib/libm/noieee_src/n_fminf.c
diff -u /dev/null src/lib/libm/noieee_src/n_fminf.c:1.1
--- /dev/null	Sun Jan  9 02:32:13 2011
+++ src/lib/libm/noieee_src/n_fminf.c	Sun Jan  9 02:32:13 2011
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011 Jonathan A. Kollasch
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBM_SCCS) && !defined(lint)
+__RCSID("$NetBSD: n_fminf.c,v 1.1 2011/01/09 02:32:13 jakllsch Exp $");
+#endif
+
+#include <math.h>
+
+float
+fminf(float x, float y)
+{
+	return x < y ? x : y;
+}

Reply via email to