Subject: libc ieee math cleanup
To: None <tech-userlevel@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-userlevel
Date: 02/12/2002 02:22:04
Hi,

The following diff is a clean up some of the rampant code duplication in
libc.  The following functions

	libc/gen/ieee754_frexp.c
	libc/gen/ieee754_isinf.c
	libc/gen/ieee754_isnan.c
	libc/gen/ieee754_ldexp.c
	libc/gen/ieee754_modf.c

and constants are added

	libc/gen/ieee754_infinity.c
	libc/gen/ieee754_nanf.c

and many duplicates of the exact same code are removed.  The ARM
isinf/isnan aliasing fixes are used in the common versions, but the
powerpc modf.c delinting isn't.  The diff for that is (in rev 1.4 of
lib/libc/arch/powerpc/gen/modf.c)

-	v.s.dbl_fracl = frac & 0xffffffff;
-	v.s.dbl_frach = frac >> 32;
+	v.s.dbl_fracl = (u_int)(frac & 0x00000000ffffffffLLU);
+	v.s.dbl_frach = (u_int)(frac >> 32);

but I'm not sure if that's portable across all our architectures.
Comments anyone?  Architectures that had existing assembly routines
have those routines left untouched.


Also, some new unions are used for float- and double-sized variables
that use "unsigned char" arrays as initialisers to get the correct
alignment for those variables.


I've only tested this on mipsel, alpha and i386 but the changes are
pretty much mechanical.  That said, anyone able to test on other
platforms would be appreciated.  Vaxen folk are exempt :-)

I'd like to commit this in the next couple of days unless there are
any genuine objections.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/


Index: include/math.h
===================================================================
RCS file: /cvsroot/basesrc/include/math.h,v
retrieving revision 1.23
diff -d -p -u -r1.23 math.h
--- include/math.h	2001/01/05 23:36:38	1.23
+++ include/math.h	2002/02/08 10:47:15
@@ -20,13 +20,35 @@
 
 #include <sys/cdefs.h>
 #include <sys/featuretest.h>
-#include <machine/math.h>
 
+union __float_u {
+	unsigned char __dummy[sizeof(float) / sizeof(char)];
+	float __val;
+};
+
+union __double_u {
+	unsigned char __dummy[sizeof(double) / sizeof(char)];
+	double __val;
+};
+
+#include <machine/math.h>		/* may use __float_u or __double_u */
+
 /*
  * ANSI/POSIX
  */
-extern __const char __infinity[];
-#define HUGE_VAL	(*(__const double *)(__const void *)__infinity)
+extern __const union __double_u __infinity;
+#define HUGE_VAL	__infinity.__val
+
+/*
+ * ISO C99
+ */
+#if defined(__HAVE_NANF) && \
+    (!defined(_ANSI_SOURCE) && \
+    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
+     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L))
+extern __const union __float_u __nanf;
+#define	NAN		__nanf.__val
+#endif /* __HAVE_NANF && (!_ANSI_SOURCE && ....) */
 
 /*
  * XOPEN/SVID
Index: lib/libc/gen/ieee754_frexp.c
===================================================================
RCS file: ieee754_frexp.c
diff -N ieee754_frexp.c
--- /dev/null	Fri Feb  8 07:31:28 2002
+++ ieee754_frexp.c	Fri Feb  8 12:47:15 2002
@@ -0,0 +1,86 @@
+/*	$NetBSD: frexp.c,v 1.4 1999/08/29 18:39:35 mycroft Exp $	*/
+
+/*
+ * Copyright (c) 1992, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+ *
+ * from: Header: frexp.c,v 1.1 91/07/07 04:45:01 torek Exp
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)frexp.c	8.1 (Berkeley) 6/4/93";
+#else
+__RCSID("$NetBSD: frexp.c,v 1.4 1999/08/29 18:39:35 mycroft Exp $");
+#endif
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <machine/ieee.h>
+#include <math.h>
+
+/*
+ * Split the given value into a fraction in the range [0.5, 1.0) and
+ * an exponent, such that frac * (2^exp) == value.  If value is 0,
+ * return 0.
+ */
+double
+frexp(value, eptr)
+	double value;
+	int *eptr;
+{
+	union {
+                double v;
+		struct ieee_double s;
+	} u;
+
+	if (value) {
+		/*
+		 * Fractions in [0.5..1.0) have an exponent of 2^-1.
+		 * Leave Inf and NaN alone, however.
+		 * WHAT ABOUT DENORMS?
+		 */
+		u.v = value;
+		if (u.s.dbl_exp != DBL_EXP_INFNAN) {
+			*eptr = u.s.dbl_exp - (DBL_EXP_BIAS - 1);
+			u.s.dbl_exp = DBL_EXP_BIAS - 1;
+		}
+		return (u.v);
+	} else {
+		*eptr = 0;
+		return (0.0);
+	}
+}
Index: lib/libc/gen/ieee754_infinity.c
===================================================================
RCS file: ieee754_infinity.c
diff -N ieee754_infinity.c
--- /dev/null	Fri Feb  8 07:31:28 2002
+++ ieee754_infinity.c	Fri Feb  8 12:47:15 2002
@@ -0,0 +1,15 @@
+/*	$NetBSD: infinity.c,v 1.5 1998/11/14 19:31:02 christos Exp $	*/
+
+/*
+ * IEEE-compatible infinity.c -- public domain.
+ */
+
+#include <math.h>
+#include <machine/endian.h>
+
+const union __double_u __infinity =
+#if BYTE_ORDER == BIG_ENDIAN
+	{ { 0x7f, 0xf0, 0, 0, 0, 0,    0,    0} };
+#else
+	{ {    0,    0, 0, 0, 0, 0, 0xf0, 0x7f} };
+#endif
Index: lib/libc/gen/ieee754_isinf.c
===================================================================
RCS file: ieee754_isinf.c
diff -N ieee754_isinf.c
--- /dev/null	Fri Feb  8 07:31:28 2002
+++ ieee754_isinf.c	Fri Feb  8 12:47:15 2002
@@ -0,0 +1,72 @@
+/*	$NetBSD: isinf.c,v 1.5 2000/01/22 22:44:59 mycroft Exp $	*/
+
+/*
+ * Copyright (c) 1992, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+ *
+ * from: Header: isinf.c,v 1.1 91/07/08 19:03:34 torek Exp
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)isinf.c	8.1 (Berkeley) 6/4/93";
+#else
+__RCSID("$NetBSD: isinf.c,v 1.5 2000/01/22 22:44:59 mycroft Exp $");
+#endif
+#endif /* LIBC_SCCS and not lint */
+
+#include "namespace.h"
+#include <sys/types.h>
+#include <machine/ieee.h>
+#include <math.h>
+
+#ifdef __weak_alias
+__weak_alias(isinf,_isinf)
+#endif
+
+int
+isinf(d)
+	double d;
+{
+	union {
+		double d;
+		struct ieee_double dbl;
+	} u;
+
+	u.d = d;
+	return (u.dbl.dbl_exp == DBL_EXP_INFNAN &&
+	    (u.dbl.dbl_frach == 0 && u.dbl.dbl_fracl == 0));
+}
Index: lib/libc/gen/ieee754_isnan.c
===================================================================
RCS file: ieee754_isnan.c
diff -N ieee754_isnan.c
--- /dev/null	Fri Feb  8 07:31:28 2002
+++ ieee754_isnan.c	Fri Feb  8 12:47:15 2002
@@ -0,0 +1,68 @@
+/*	$NetBSD: isnan.c,v 1.2 2000/01/22 22:44:59 mycroft Exp $	*/
+
+/*
+ * Copyright (c) 1992, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+ *
+ * from: Header: isinf.c,v 1.1 91/07/08 19:03:34 torek Exp
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)isinf.c	8.1 (Berkeley) 6/4/93";
+#else
+__RCSID("$NetBSD: isnan.c,v 1.2 2000/01/22 22:44:59 mycroft Exp $");
+#endif
+#endif /* LIBC_SCCS and not lint */
+
+#include "namespace.h"
+#include <sys/types.h>
+#include <machine/ieee.h>
+#include <math.h>
+
+#ifdef __weak_alias
+__weak_alias(isnan,_isnan)
+#endif
+
+int
+isnan(d)
+	double d;
+{
+	struct ieee_double *p = (struct ieee_double *)(void *)&d;
+
+	return (p->dbl_exp == DBL_EXP_INFNAN &&
+	    (p->dbl_frach != 0 || p->dbl_fracl != 0));
+}
Index: lib/libc/gen/ieee754_ldexp.c
===================================================================
RCS file: ieee754_ldexp.c
diff -N ieee754_ldexp.c
--- /dev/null	Fri Feb  8 07:31:28 2002
+++ ieee754_ldexp.c	Fri Feb  8 12:47:16 2002
@@ -0,0 +1,154 @@
+/*	$NetBSD: ldexp.c,v 1.9 1999/08/30 18:28:24 mycroft Exp $	*/
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Charles M. Hannum.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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(LIBC_SCCS) && !defined(lint)
+__RCSID("$NetBSD: ldexp.c,v 1.9 1999/08/30 18:28:24 mycroft Exp $");
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <machine/ieee.h>
+#include <errno.h>
+#include <math.h>
+
+/*
+ * Multiply the given value by 2^expon.
+ */
+double
+ldexp(val, expon)
+	double val;
+	int expon;
+{
+	int oldexp, newexp;
+	union {
+		double v;
+		struct ieee_double s;
+	} u, mul;
+
+	u.v = val;
+	oldexp = u.s.dbl_exp;
+
+	/*
+	 * If input is zero, Inf or NaN, just return it.
+	 */
+	if (u.v == 0.0 || oldexp == DBL_EXP_INFNAN)
+		return (val);
+
+	if (oldexp == 0) {
+		/*
+		 * u.v is denormal.  We must adjust it so that the exponent
+		 * arithmetic below will work.
+		 */
+		if (expon <= DBL_EXP_BIAS) {
+			/*
+			 * Optimization: if the scaling can be done in a single
+			 * multiply, or underflows, just do it now.
+			 */
+			if (expon <= -DBL_FRACBITS) {
+				errno = ERANGE;
+				return (0.0);
+			}
+			mul.v = 0.0;
+			mul.s.dbl_exp = expon + DBL_EXP_BIAS;
+			u.v *= mul.v;
+			if (u.v == 0.0) {
+				errno = ERANGE;
+				return (0.0);
+			}
+			return (u.v);
+		} else {
+			/*
+			 * We know that expon is very large, and therefore the
+			 * result cannot be denormal (though it may be Inf).
+			 * Shift u.v by just enough to make it normal.
+			 */
+			mul.v = 0.0;
+			mul.s.dbl_exp = DBL_FRACBITS + DBL_EXP_BIAS;
+			u.v *= mul.v;
+			expon -= DBL_FRACBITS;
+			oldexp = u.s.dbl_exp;
+		}
+	}
+
+	/*
+	 * u.v is now normalized and oldexp has been adjusted if necessary.
+	 * Calculate the new exponent and check for underflow and overflow.
+	 */
+	newexp = oldexp + expon;
+
+	if (newexp <= 0) {
+		/*
+		 * The output number is either denormal or underflows (see
+		 * comments in machine/ieee.h).
+		 */
+		if (newexp <= -DBL_FRACBITS) {
+			errno = ERANGE;
+			return (0.0);
+		}
+		/*
+		 * Denormalize the result.  We do this with a multiply.  If
+		 * expon is very large, it won't fit in a double, so we have
+		 * to adjust the exponent first.  This is safe because we know
+		 * that u.v is normal at this point.
+		 */
+		if (expon <= -DBL_EXP_BIAS) {
+			u.s.dbl_exp = 1;
+			expon += oldexp - 1;
+		}
+		mul.v = 0.0;
+		mul.s.dbl_exp = expon + DBL_EXP_BIAS;
+		u.v *= mul.v;
+		return (u.v);
+	} else if (newexp >= DBL_EXP_INFNAN) {
+		/*
+		 * The result overflowed; return +/-Inf.
+		 */
+		u.s.dbl_exp = DBL_EXP_INFNAN;
+		u.s.dbl_frach = 0;
+		u.s.dbl_fracl = 0;
+		errno = ERANGE;
+		return (u.v);
+	} else {
+		/*
+		 * The result is normal; just replace the old exponent with the
+		 * new one.
+		 */
+		u.s.dbl_exp = newexp;
+		return (u.v);
+	}
+}
Index: lib/libc/gen/ieee754_modf.c
===================================================================
RCS file: ieee754_modf.c
diff -N ieee754_modf.c
--- /dev/null	Fri Feb  8 07:31:28 2002
+++ ieee754_modf.c	Fri Feb  8 12:47:16 2002
@@ -0,0 +1,104 @@
+/* $NetBSD: modf.c,v 1.3 2000/06/14 06:49:02 cgd Exp $ */
+
+/*
+ * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ * 
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#include <sys/types.h>
+#include <machine/ieee.h>
+#include <errno.h>
+#include <math.h>
+
+/*
+ * double modf(double val, double *iptr)
+ * returns: f and i such that |f| < 1.0, (f + i) = val, and
+ *	sign(f) == sign(i) == sign(val).
+ *
+ * Beware signedness when doing subtraction, and also operand size!
+ */
+double
+modf(val, iptr)
+	double val, *iptr;
+{
+	union doub {
+		double v;
+		struct ieee_double s;
+	} u, v;
+	u_int64_t frac;
+
+	/*
+	 * If input is Inf or NaN, return it and leave i alone.
+	 */
+	u.v = val;
+	if (u.s.dbl_exp == DBL_EXP_INFNAN)
+		return (u.v);
+
+	/*
+	 * If input can't have a fractional part, return
+	 * (appropriately signed) zero, and make i be the input.
+	 */
+	if ((int)u.s.dbl_exp - DBL_EXP_BIAS > DBL_FRACBITS - 1) {
+		*iptr = u.v;
+		v.v = 0.0;
+		v.s.dbl_sign = u.s.dbl_sign;
+		return (v.v);
+	}
+
+	/*
+	 * If |input| < 1.0, return it, and set i to the appropriately
+	 * signed zero.
+	 */
+	if (u.s.dbl_exp < DBL_EXP_BIAS) {
+		v.v = 0.0;
+		v.s.dbl_sign = u.s.dbl_sign;
+		*iptr = v.v;
+		return (u.v);
+	}
+
+	/*
+	 * There can be a fractional part of the input.
+	 * If you look at the math involved for a few seconds, it's
+	 * plain to see that the integral part is the input, with the
+	 * low (DBL_FRACBITS - (exponent - DBL_EXP_BIAS)) bits zeroed,
+	 * the fractional part is the part with the rest of the
+	 * bits zeroed.  Just zeroing the high bits to get the
+	 * fractional part would yield a fraction in need of
+	 * normalization.  Therefore, we take the easy way out, and
+	 * just use subtraction to get the fractional part.
+	 */
+	v.v = u.v;
+	/* Zero the low bits of the fraction, the sleazy way. */
+	frac = ((u_int64_t)v.s.dbl_frach << 32) + v.s.dbl_fracl;
+	frac >>= DBL_FRACBITS - (u.s.dbl_exp - DBL_EXP_BIAS);
+	frac <<= DBL_FRACBITS - (u.s.dbl_exp - DBL_EXP_BIAS);
+	v.s.dbl_fracl = frac & 0xffffffff;
+	v.s.dbl_frach = frac >> 32;
+	*iptr = v.v;
+
+	u.v -= v.v;
+	u.s.dbl_sign = v.s.dbl_sign;
+	return (u.v);
+}
Index: lib/libc/gen/ieee754_nanf.c
===================================================================
RCS file: ieee754_nanf.c
diff -N ieee754_nanf.c
--- /dev/null	Fri Feb  8 07:31:28 2002
+++ ieee754_nanf.c	Fri Feb  8 12:47:16 2002
@@ -0,0 +1,18 @@
+/*	$NetBSD: nanf.c,v 1.1 1999/12/23 10:15:07 kleink Exp $	*/
+
+#include <sys/cdefs.h>
+#if defined(LIBC_SCCS) && !defined(lint)
+__RCSID("$NetBSD: nanf.c,v 1.1 1999/12/23 10:15:07 kleink Exp $");
+#endif /* LIBC_SCCS and not lint */
+
+#include <math.h>
+#include <machine/endian.h>
+
+/* bytes for quiet NaN (IEEE single precision) */
+const union __float_u __nanf =
+#if BYTE_ORDER == BIG_ENDIAN
+		{ { 0x7f, 0xc0,    0,    0 } };
+#else
+		{ {    0,    0, 0xc0, 0x7f } };
+#endif
+const union __float_u __nanf2 = {{ 0, 0, 0, 0}};
Index: sys/arch/alpha/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/alpha/include/math.h,v
retrieving revision 1.3
diff -d -p -u -r1.3 math.h
--- sys/arch/alpha/include/math.h	2000/02/05 14:04:36	1.3
+++ sys/arch/alpha/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.3 2000/02/05 14:04:36 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/arm/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm/include/math.h,v
retrieving revision 1.1
diff -d -p -u -r1.1 math.h
--- sys/arch/arm/include/math.h	2001/01/10 19:02:07	1.1
+++ sys/arch/arm/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.1 2001/01/10 19:02:07 bjh21 Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/i386/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/include/math.h,v
retrieving revision 1.3
diff -d -p -u -r1.3 math.h
--- sys/arch/i386/include/math.h	2000/02/05 14:04:37	1.3
+++ sys/arch/i386/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.3 2000/02/05 14:04:37 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/m68k/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/m68k/include/math.h,v
retrieving revision 1.3
diff -d -p -u -r1.3 math.h
--- sys/arch/m68k/include/math.h	2000/02/05 14:04:38	1.3
+++ sys/arch/m68k/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.3 2000/02/05 14:04:38 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/mips/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/include/math.h,v
retrieving revision 1.3
diff -d -p -u -r1.3 math.h
--- sys/arch/mips/include/math.h	2000/02/05 14:04:39	1.3
+++ sys/arch/mips/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.3 2000/02/05 14:04:39 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/pc532/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/pc532/include/math.h,v
retrieving revision 1.2
diff -d -p -u -r1.2 math.h
--- sys/arch/pc532/include/math.h	2000/01/04 14:20:14	1.2
+++ sys/arch/pc532/include/math.h	2002/02/08 10:47:16
@@ -1,10 +1,3 @@
 /*	$NetBSD: math.h,v 1.2 2000/01/04 14:20:14 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
-    !defined(_XOPEN_SOURCE) || defined(_ISOC99_SOURCE)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/powerpc/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/powerpc/include/math.h,v
retrieving revision 1.3
diff -d -p -u -r1.3 math.h
--- sys/arch/powerpc/include/math.h	2000/02/05 14:04:40	1.3
+++ sys/arch/powerpc/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.3 2000/02/05 14:04:40 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/sh3/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sh3/include/math.h,v
retrieving revision 1.2
diff -d -p -u -r1.2 math.h
--- sys/arch/sh3/include/math.h	2000/02/05 14:04:40	1.2
+++ sys/arch/sh3/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.2 2000/02/05 14:04:40 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/sparc/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc/include/math.h,v
retrieving revision 1.3
diff -d -p -u -r1.3 math.h
--- sys/arch/sparc/include/math.h	2000/02/05 14:04:41	1.3
+++ sys/arch/sparc/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.3 2000/02/05 14:04:41 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/sparc64/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/include/math.h,v
retrieving revision 1.3
diff -d -p -u -r1.3 math.h
--- sys/arch/sparc64/include/math.h	2000/02/05 14:04:41	1.3
+++ sys/arch/sparc64/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.3 2000/02/05 14:04:41 kleink Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: sys/arch/x86_64/include/math.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/x86_64/include/math.h,v
retrieving revision 1.1
diff -d -p -u -r1.1 math.h
--- sys/arch/x86_64/include/math.h	2001/06/19 00:20:11	1.1
+++ sys/arch/x86_64/include/math.h	2002/02/08 10:47:16
@@ -1,11 +1,3 @@
 /*	$NetBSD: math.h,v 1.1 2001/06/19 00:20:11 fvdl Exp $	*/
 
-/*
- * ISO C99
- */
-#if !defined(_ANSI_SOURCE) && \
-    (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
-     defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
-extern __const char	__nanf[];
-#define	NAN		(*(__const float *)(__const void *)__nanf)
-#endif
+#define	__HAVE_NANF
Index: lib/libc/arch/alpha/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/alpha/gen/Makefile.inc,v
retrieving revision 1.7
diff -d -p -u -r1.7 Makefile.inc
--- lib/libc/arch/alpha/gen/Makefile.inc	1999/12/23 10:15:06	1.7
+++ lib/libc/arch/alpha/gen/Makefile.inc	2002/02/08 10:47:16
@@ -1,6 +1,12 @@
 #	$NetBSD: Makefile.inc,v 1.7 1999/12/23 10:15:06 kleink Exp $
 
-SRCS+=	fabs.S frexp.c infinity.c isinf.c isnan.c ldexp.c modf.c nanf.c
+SRCS+=	fabs.S 
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c ieee754_ldexp.c
+SRCS+=	ieee754_modf.c
+
 SRCS+=	flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
 	fpsetround.c fpsetsticky.c
 SRCS+=	_setjmp.S
Index: lib/libc/arch/alpha/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328an	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/alpha/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328ao	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,34 +0,0 @@				[ file removed ]
Index: lib/libc/arch/alpha/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328ap	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/alpha/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328aq	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/alpha/gen/ldexp.c
===================================================================
RCS file: ldexp.c
diff -N ldexp.c
--- /tmp/cvs03328ar	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/alpha/gen/modf.c
===================================================================
RCS file: modf.c
diff -N modf.c
--- /tmp/cvs03328as	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,104 +0,0 @@				[ file removed ]
Index: lib/libc/arch/alpha/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328at	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,15 +0,0 @@				[ file removed ]
Index: lib/libc/arch/arm/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/arm/gen/Makefile.inc,v
retrieving revision 1.1
diff -d -p -u -r1.1 Makefile.inc
--- lib/libc/arch/arm/gen/Makefile.inc	2000/12/29 20:13:45	1.1
+++ lib/libc/arch/arm/gen/Makefile.inc	2002/02/08 10:47:16
@@ -2,7 +2,12 @@
 
 SRCS+=	alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \
 	fabs.c flt_rounds.c \
-	infinity.c isinf.c isnan.c frexp.c ldexp.c modf.c nanf.c
+	infinity.c
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_nanf.c	# infinity is ``different'' on arm, use local version
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c ieee754_ldexp.c
+SRCS+=	ieee754_modf.c
 
 SRCS+=	setjmp.S __setjmp14.S
 SRCS+=	_setjmp.S
Index: lib/libc/arch/arm/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328av	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/arm/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328aw	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,72 +0,0 @@				[ file removed ]
Index: lib/libc/arch/arm/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328ax	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,72 +0,0 @@				[ file removed ]
Index: lib/libc/arch/arm/gen/ldexp.c
===================================================================
RCS file: ldexp.c
diff -N ldexp.c
--- /tmp/cvs03328ay	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/arm/gen/modf.c
===================================================================
RCS file: modf.c
diff -N modf.c
--- /tmp/cvs03328az	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,104 +0,0 @@				[ file removed ]
Index: lib/libc/arch/arm/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328ba	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/i386/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/i386/gen/Makefile.inc,v
retrieving revision 1.11
diff -d -p -u -r1.11 Makefile.inc
--- lib/libc/arch/i386/gen/Makefile.inc	2000/12/13 07:42:48	1.11
+++ lib/libc/arch/i386/gen/Makefile.inc	2002/02/08 10:47:16
@@ -10,7 +10,12 @@ SRCS+=	_setjmp.S
 SRCS+=	sigsetjmp.S __sigsetjmp14.S
 
 # objects built from C sources
-SRCS+=	bswap64.c frexp.c infinity.c isinf.c isnan.c ldexp.c nanf.c
+SRCS+=	bswap64.c ldexp.c
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c
+
 
 # "internal" objects (don't provide part of the user-visible API)
 SRCS+=	divsi3.S fixdfsi.S fixunsdfsi.S udivsi3.S
Index: lib/libc/arch/i386/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328bc	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/i386/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328bd	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/i386/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328be	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/i386/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328bf	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/i386/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328bg	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/m68k/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/m68k/gen/Makefile.inc,v
retrieving revision 1.13
diff -d -p -u -r1.13 Makefile.inc
--- lib/libc/arch/m68k/gen/Makefile.inc	2001/06/13 18:05:32	1.13
+++ lib/libc/arch/m68k/gen/Makefile.inc	2002/02/08 10:47:16
@@ -1,6 +1,11 @@
 #	$NetBSD: Makefile.inc,v 1.13 2001/06/13 18:05:32 fredette Exp $
 
-SRCS+=	alloca.S fabs.S frexp.c infinity.c isinf.c isnan.c nanf.c
+SRCS+=	alloca.S fabs.S
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c
+
 SRCS+=	ashlsi3.S ashrsi3.S \
 	lshlsi3.S lshrsi3.S \
 	negdf2.S negsf2.S
@@ -10,7 +15,7 @@ SRCS+=	bswap16.S bswap32.S bswap64.S
 # much of the (soft)float and integer support that would 
 # otherwise be compiled here.
 .if	${MACHINE_ARCH} == "m68000"
-SRCS+=	modf_softfloat.c
+SRCS+=	ieee754_modf.c			# generic ieee754 version
 SRCS+=	flt_rounds_softfloat.S
 .else
 SRCS+=	modf.S
@@ -28,11 +33,11 @@ SRCS+=	_setjmp.S
 SRCS+=	sigsetjmp.S __sigsetjmp14.S
 
 .ifdef M68040
-SRCS+=	ldexp_040.c
+SRCS+=	ieee754_ldexp.c			# generic ieee754 version
 .elifdef M68060
-SRCS+=	ldexp_040.c
+SRCS+=	ieee754_ldexp.c			# generic ieee754 version
 .elif	${MACHINE_ARCH} == "m68000"
-SRCS+=	ldexp_softfloat.c
+SRCS+=	ieee754_ldexp.c			# generic ieee754 version
 .else
 SRCS+=	ldexp_881.c
 .endif
Index: lib/libc/arch/m68k/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328bi	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/m68k/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328bj	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/m68k/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328bk	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/m68k/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328bl	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/m68k/gen/ldexp_040.c
===================================================================
RCS file: ldexp_040.c
diff -N ldexp_040.c
--- /tmp/cvs03328bm	Fri Feb  8 12:47:18 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/m68k/gen/ldexp_softfloat.c
===================================================================
RCS file: ldexp_softfloat.c
diff -N ldexp_softfloat.c
--- /tmp/cvs03328bn	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/m68k/gen/modf_softfloat.c
===================================================================
RCS file: modf_softfloat.c
diff -N modf_softfloat.c
--- /tmp/cvs03328bo	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,104 +0,0 @@				[ file removed ]
Index: lib/libc/arch/m68k/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328bp	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/mips/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/mips/gen/Makefile.inc,v
retrieving revision 1.12
diff -d -p -u -r1.12 Makefile.inc
--- lib/libc/arch/mips/gen/Makefile.inc	2000/03/05 05:41:53	1.12
+++ lib/libc/arch/mips/gen/Makefile.inc	2002/02/08 10:47:16
@@ -1,6 +1,11 @@
 #	$NetBSD: Makefile.inc,v 1.12 2000/03/05 05:41:53 shin Exp $
 
-SRCS+=	fabs.S frexp.c infinity.c isinf.c isnan.c ldexp.S modf.S nanf.c
+SRCS+=	fabs.S ldexp.S modf.S
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c
+
 SRCS+=	flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
 	fpsetround.c fpsetsticky.c
 
Index: lib/libc/arch/mips/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328br	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/mips/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328bs	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
-#endif
Index: lib/libc/arch/mips/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328bt	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
-}
Index: lib/libc/arch/mips/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328bu	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/mips/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328bv	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,18 +0,0 @@				[ file removed ]
Index: lib/libc/arch/ns32k/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/ns32k/gen/Makefile.inc,v
retrieving revision 1.13
diff -d -p -u -r1.13 Makefile.inc
--- lib/libc/arch/ns32k/gen/Makefile.inc	1999/12/23 10:15:07	1.13
+++ lib/libc/arch/ns32k/gen/Makefile.inc	2002/02/08 10:47:16
@@ -12,6 +12,9 @@ SRCS+=	setjmp.S sigsetjmp.S
 
 # objects built from C sources
 SRCS+=	flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
-	fpsetround.c fpsetsticky.c infinity.c frexp.c isinf.c isnan.c ldexp.c \
-	nanf.c \
+	fpsetround.c fpsetsticky.c \
 	bswap64.c
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_nanf.c	ieee754_infinity.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c ieee754_ldexp.c
Index: lib/libc/arch/ns32k/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328bx	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/ns32k/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328by	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,11 +0,0 @@				[ file removed ]
Index: lib/libc/arch/ns32k/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328bz	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/ns32k/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328ca	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/ns32k/gen/ldexp.c
===================================================================
RCS file: ldexp.c
diff -N ldexp.c
--- /tmp/cvs03328cb	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/ns32k/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328cc	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/powerpc/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/powerpc/gen/Makefile.inc,v
retrieving revision 1.8
diff -d -p -u -r1.8 Makefile.inc
--- lib/libc/arch/powerpc/gen/Makefile.inc	2001/05/25 12:17:45	1.8
+++ lib/libc/arch/powerpc/gen/Makefile.inc	2002/02/08 10:47:16
@@ -1,11 +1,15 @@
 #	$NetBSD: Makefile.inc,v 1.8 2001/05/25 12:17:45 simonb Exp $
 
 SRCS+=	_setjmp.S setjmp.S sigsetjmp.S __setjmp14.S __sigsetjmp14.S
-SRCS+=	isinf.c isnan.c ldexp.c fabs.c flt_rounds.c infinity.c nanf.c
 SRCS+=	bswap16.c bswap32.c bswap64.c
-SRCS+=	frexp.c modf.c
-SRCS+=	syncicache.c
+SRCS+=	fabs.c flt_rounds.c
 SRCS+=	fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c
 SRCS+=	fpgetsticky.c fpsetsticky.c
+SRCS+=	syncicache.c
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c ieee754_ldexp.c
+SRCS+=	ieee754_modf.c
 
 KMSRCS+=syncicache.c
Index: lib/libc/arch/powerpc/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328ce	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/powerpc/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328cf	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/powerpc/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328cg	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/powerpc/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328ch	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/powerpc/gen/ldexp.c
===================================================================
RCS file: ldexp.c
diff -N ldexp.c
--- /tmp/cvs03328ci	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/powerpc/gen/modf.c
===================================================================
RCS file: modf.c
diff -N modf.c
--- /tmp/cvs03328cj	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,104 +0,0 @@				[ file removed ]
Index: lib/libc/arch/powerpc/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328ck	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sh3/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/sh3/gen/Makefile.inc,v
retrieving revision 1.4
diff -d -p -u -r1.4 Makefile.inc
--- lib/libc/arch/sh3/gen/Makefile.inc	2000/06/09 04:47:31	1.4
+++ lib/libc/arch/sh3/gen/Makefile.inc	2002/02/08 10:47:16
@@ -2,9 +2,12 @@
 
 SRCS+=	_setjmp.S setjmp.S sigsetjmp.S __setjmp14.S __sigsetjmp14.S
 
-SRCS+=	fabs.c flt_rounds.c frexp.c infinity.c \
-	isinf.c isnan.c ldexp.c modf.c nanf.c \
-	bswap16.c bswap32.c bswap64.c
+SRCS+=	fabs.c flt_rounds.c ldexp.c bswap16.c bswap32.c bswap64.c
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c ieee754_ldexp.c
+SRCS+=	ieee754_modf.c
 
 SRCS+=	ashiftrt.S ashlsi3.S ashrsi3.S lshrsi3.S movstr.S movstrSI.S \
 	mulsi3.S sdivsi3.S udivsi3.S
Index: lib/libc/arch/sh3/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328cm	Fri Feb  8 12:47:19 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sh3/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328cn	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
-#endif
Index: lib/libc/arch/sh3/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328co	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sh3/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328cp	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sh3/gen/ldexp.c
===================================================================
RCS file: ldexp.c
diff -N ldexp.c
--- /tmp/cvs03328cq	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sh3/gen/modf.c
===================================================================
RCS file: modf.c
diff -N modf.c
--- /tmp/cvs03328cr	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,104 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sh3/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328cs	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,18 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/sparc/gen/Makefile.inc,v
retrieving revision 1.6
diff -d -p -u -r1.6 Makefile.inc
--- lib/libc/arch/sparc/gen/Makefile.inc	1999/12/23 10:15:09	1.6
+++ lib/libc/arch/sparc/gen/Makefile.inc	2002/02/08 10:47:17
@@ -1,8 +1,12 @@
 #	$NetBSD: Makefile.inc,v 1.6 1999/12/23 10:15:09 kleink Exp $
 
-SRCS+=	fabs.S frexp.c infinity.c isinf.c isnan.c ldexp.c modf.S nanf.c
+SRCS+=	fabs.S modf.S
 SRCS+=	flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
 	fpsetround.c fpsetsticky.c
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c ieee754_ldexp.c
 
 SRCS+=	setjmp.S __setjmp14.S
 SRCS+=	_setjmp.S
Index: lib/libc/arch/sparc/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328cu	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328cv	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328cw	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328cx	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc/gen/ldexp.c
===================================================================
RCS file: ldexp.c
diff -N ldexp.c
--- /tmp/cvs03328cy	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328cz	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc64/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/sparc64/gen/Makefile.inc,v
retrieving revision 1.4
diff -d -p -u -r1.4 Makefile.inc
--- lib/libc/arch/sparc64/gen/Makefile.inc	1999/12/23 10:15:09	1.4
+++ lib/libc/arch/sparc64/gen/Makefile.inc	2002/02/08 10:47:17
@@ -1,8 +1,12 @@
 #	$NetBSD: Makefile.inc,v 1.4 1999/12/23 10:15:09 kleink Exp $
 
-SRCS+=	fabs.S frexp.c infinity.c isinf.c isnan.c ldexp.c modf.S nanf.c
+SRCS+=	fabs.S modf.S
 SRCS+=	flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
 	fpsetround.c fpsetsticky.c
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c ieee754_ldexp.c
 
 SRCS+=	bswap16.c bswap32.c bswap64.c
 SRCS+=	setjmp.S __setjmp14.S
Index: lib/libc/arch/sparc64/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328db	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc64/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328dc	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc64/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328dd	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc64/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328de	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc64/gen/ldexp.c
===================================================================
RCS file: ldexp.c
diff -N ldexp.c
--- /tmp/cvs03328df	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,154 +0,0 @@				[ file removed ]
Index: lib/libc/arch/sparc64/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328dg	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/x86_64/gen/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/x86_64/gen/Makefile.inc,v
retrieving revision 1.1
diff -d -p -u -r1.1 Makefile.inc
--- lib/libc/arch/x86_64/gen/Makefile.inc	2001/06/19 00:25:02	1.1
+++ lib/libc/arch/x86_64/gen/Makefile.inc	2002/02/08 10:47:17
@@ -10,7 +10,11 @@ SRCS+=	_setjmp.S
 SRCS+=	__sigsetjmp14.S
 
 # objects built from C sources
-SRCS+= frexp.c infinity.c isinf.c isnan.c ldexp.c nanf.c
+SRCS+=	ldexp.c
+
+# Common ieee754 constants and functions
+SRCS+=	ieee754_infinity.c ieee754_nanf.c
+SRCS+=	ieee754_frexp.c ieee754_isinf.c ieee754_isnan.c
 
 LSRCS+=	Lint__setjmp.c Lint_alloca.c Lint_bswap16.c Lint_bswap32.c \
 	Lint_bswap64.c Lint_fabs.c Lint_modf.c \
Index: lib/libc/arch/x86_64/gen/frexp.c
===================================================================
RCS file: frexp.c
diff -N frexp.c
--- /tmp/cvs03328di	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,86 +0,0 @@				[ file removed ]
Index: lib/libc/arch/x86_64/gen/infinity.c
===================================================================
RCS file: infinity.c
diff -N infinity.c
--- /tmp/cvs03328dj	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]
Index: lib/libc/arch/x86_64/gen/isinf.c
===================================================================
RCS file: isinf.c
diff -N isinf.c
--- /tmp/cvs03328dk	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/x86_64/gen/isnan.c
===================================================================
RCS file: isnan.c
diff -N isnan.c
--- /tmp/cvs03328dl	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,68 +0,0 @@				[ file removed ]
Index: lib/libc/arch/x86_64/gen/nanf.c
===================================================================
RCS file: nanf.c
diff -N nanf.c
--- /tmp/cvs03328dm	Fri Feb  8 12:47:20 2002
+++ /dev/null	Fri Feb  8 07:31:28 2002
@@ -1,13 +0,0 @@				[ file removed ]