Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/regress/lib/libc ldexp has been atf-ified



details:   https://anonhg.NetBSD.org/src/rev/7164149ea0b0
branches:  trunk
changeset: 760150:7164149ea0b0
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Dec 28 17:35:25 2010 +0000

description:
ldexp has been atf-ified

diffstat:

 regress/lib/libc/Makefile       |    5 +-
 regress/lib/libc/ldexp/Makefile |   17 ---
 regress/lib/libc/ldexp/expected |   92 ----------------
 regress/lib/libc/ldexp/ldexp.c  |  220 ----------------------------------------
 4 files changed, 1 insertions(+), 333 deletions(-)

diffs (truncated from 360 to 300 lines):

diff -r 2ab87354811b -r 7164149ea0b0 regress/lib/libc/Makefile
--- a/regress/lib/libc/Makefile Tue Dec 28 17:33:58 2010 +0000
+++ b/regress/lib/libc/Makefile Tue Dec 28 17:35:25 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.65 2010/12/28 12:48:38 pgoyette Exp $
+#      $NetBSD: Makefile,v 1.66 2010/12/28 17:35:25 pgoyette Exp $
 
 SUBDIR+= atexit citrus clone context convfp db \
        divrem gdtoa getaddrinfo hsearch inet int_fmtio locale md5sha \
@@ -10,9 +10,6 @@
 .if (${MACHINE_ARCH} != "vax" && ${MACHINE_ARCH} != "m68000")
 SUBDIR+= ieeefp
 .endif
-.if (${MACHINE_ARCH} != "vax")
-SUBDIR+= ldexp
-.endif
 
 .if exists(arch/${MACHINE_ARCH})
 SUBDIR+= arch/${MACHINE_ARCH}
diff -r 2ab87354811b -r 7164149ea0b0 regress/lib/libc/ldexp/Makefile
--- a/regress/lib/libc/ldexp/Makefile   Tue Dec 28 17:33:58 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-#      $NetBSD: Makefile,v 1.5 2006/03/21 18:34:22 drochner Exp $
-
-NOMAN=         # defined
-
-PROG=          ldexp
-LDADD+=                -lm
-CLEANFILES+=   output
-
-regress: ${PROG}
-       @./${PROG} >output
-       @if ! cmp -s ${.CURDIR}/expected output; then \
-               echo "FAILED"; \
-       else \
-               echo "PASSED"; \
-       fi
-
-.include <bsd.prog.mk>
diff -r 2ab87354811b -r 7164149ea0b0 regress/lib/libc/ldexp/expected
--- a/regress/lib/libc/ldexp/expected   Tue Dec 28 17:33:58 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-basics:
-                     32
-4.4942328371557897693233e+307
-4.4942328371557897693233e+307
-8.9884656743115795386465e+307
-8.9884656743115795386465e+307
-8.9884656743115795386465e+307
-                0.03125
-4.4501477170144027661805e-308
-4.4501477170144027661805e-308
-2.2250738585072013830902e-308
-2.2250738585072013830902e-308
-2.2250738585072013830902e-308
-                      1
-                      1
-
-zero:
-                      0
-                      0
-                      0
-                      0
-                      0
-                      0
-                      0
-
-infinity:
-                    inf
-                    inf
-                    inf
-                   -inf
-                   -inf
-                   -inf
-
-overflow:
-                    inf
-                    inf
-                    inf
-                    inf
-                   -inf
-                   -inf
-                   -inf
-                   -inf
-
-denormal:
-1.1125369292536006915451e-308
-1.1125369292536006915451e-308
-1.1125369292536006915451e-308
-5.5626846462680034577256e-309
-4.9406564584124654417657e-324
--1.1125369292536006915451e-308
--1.1125369292536006915451e-308
--1.1125369292536006915451e-308
--5.5626846462680034577256e-309
--4.9406564584124654417657e-324
-
-underflow:
-                      0
-                      0
-                      0
-                      0
-                     -0
-                     -0
-                     -0
-                     -0
-
-denormal, large exponent:
-                 0.0625
-                  0.125
-                   0.25
-                    0.5
-                      1
-                      2
-                      4
-                   4096
-                4194304
-             4294967296
- 4722366482869645213696
-5.9863107065073783529623e+51
-7.5885503602567541832791e+81
-9.6196304190416209014353e+111
-1.2194330274671844653834e+142
-1.5458150092069033378781e+172
-1.9595533242629369747791e+202
-2.4840289476811342962384e+232
-3.1488807865122869393369e+262
-3.9916806190694396233127e+292
-2.808895523222368605827e+306
-5.6177910464447372116541e+306
-1.1235582092889474423308e+307
-2.2471164185778948846616e+307
-4.4942328371557897693233e+307
-8.9884656743115795386465e+307
diff -r 2ab87354811b -r 7164149ea0b0 regress/lib/libc/ldexp/ldexp.c
--- a/regress/lib/libc/ldexp/ldexp.c    Tue Dec 28 17:33:58 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*     $NetBSD: ldexp.c,v 1.4 2008/04/28 20:23:04 martin Exp $ */
-
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * 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 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 <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main()
-{
-       double v;
-       int e;
-
-#define        FORMAT  "%23.23lg\n"
-
-       printf("basics:\n");
-       v = 1.0; e = 5;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = 1022;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1023); e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = 1023;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1022); e = 1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, -1022); e = 2045;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = -5;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = -1021;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, -1022); e = 1;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = -1022;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, -1021); e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1023); e = -2045;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1023); e = -1023;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, -1022); e = 1022;
-       printf(FORMAT, ldexp(v, e));
-       printf("\n");
-
-       printf("zero:\n");
-       v = 0.0; e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = 0.0; e = 0;
-       printf(FORMAT, ldexp(v, e));
-       v = 0.0; e = 1;
-       printf(FORMAT, ldexp(v, e));
-       v = 0.0; e = 1024;
-       printf(FORMAT, ldexp(v, e));
-       v = 0.0; e = 1025;
-       printf(FORMAT, ldexp(v, e));
-       v = 0.0; e = -1023;
-       printf(FORMAT, ldexp(v, e));
-       v = 0.0; e = -1024;
-       printf(FORMAT, ldexp(v, e));
-       printf("\n");
-
-       printf("infinity:\n");
-       v = ldexp(1.0, 1024); e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1024); e = 0;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1024); e = 1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, 1024); e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, 1024); e = 0;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, 1024); e = 1;
-       printf(FORMAT, ldexp(v, e));
-       printf("\n");
-
-       printf("overflow:\n");
-       v = 1.0; e = 1024;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1023); e = 1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, -1022); e = 2046;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = 1025;
-       printf(FORMAT, ldexp(v, e));
-       v = -1.0; e = 1024;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, 1023); e = 1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, -1022); e = 2046;
-       printf(FORMAT, ldexp(v, e));
-       v = -1.0; e = 1025;
-       printf(FORMAT, ldexp(v, e));
-       printf("\n");
-
-       printf("denormal:\n");
-       v = 1.0; e = -1023;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, -1022); e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1023); e = -2046;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = -1024;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = -1074;
-       printf(FORMAT, ldexp(v, e));
-       v = -1.0; e = -1023;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, -1022); e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, 1023); e = -2046;
-       printf(FORMAT, ldexp(v, e));
-       v = -1.0; e = -1024;
-       printf(FORMAT, ldexp(v, e));
-       v = -1.0; e = -1074;
-       printf(FORMAT, ldexp(v, e));
-       printf("\n");
-
-       printf("underflow:\n");
-       v = 1.0; e = -1075;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, -1074); e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(1.0, 1023); e = -2098;
-       printf(FORMAT, ldexp(v, e));
-       v = 1.0; e = -1076;
-       printf(FORMAT, ldexp(v, e));
-       v = -1.0; e = -1075;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, -1074); e = -1;
-       printf(FORMAT, ldexp(v, e));
-       v = ldexp(-1.0, 1023); e = -2098;
-       printf(FORMAT, ldexp(v, e));



Home | Main Index | Thread Index | Old Index