summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/ieeefp/inf
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2012-07-13 17:49:56 +0000
committercvs2svn <admin@example.com>2012-07-13 17:49:56 +0000
commit6f82d0e8f9756938f04071892206a5af85e676f0 (patch)
tree821921a1dd0a5a3cece91121e121cc63c4b68128 /src/regress/lib/libc/ieeefp/inf
parent9204e59073bcf27e1487ec4ac46e981902ddd904 (diff)
downloadopenbsd-eric_g2k12.tar.gz
openbsd-eric_g2k12.tar.bz2
openbsd-eric_g2k12.zip
This commit was manufactured by cvs2git to create tag 'eric_g2k12'.eric_g2k12
Diffstat (limited to '')
-rw-r--r--src/regress/lib/libc/ieeefp/inf/Makefile9
-rw-r--r--src/regress/lib/libc/ieeefp/inf/inf.c16
-rw-r--r--src/regress/lib/libc/ieeefp/infinity/Makefile22
-rw-r--r--src/regress/lib/libc/ieeefp/infinity/infinity.c77
4 files changed, 0 insertions, 124 deletions
diff --git a/src/regress/lib/libc/ieeefp/inf/Makefile b/src/regress/lib/libc/ieeefp/inf/Makefile
deleted file mode 100644
index b9a50e0ce6..0000000000
--- a/src/regress/lib/libc/ieeefp/inf/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
1# $OpenBSD: Makefile,v 1.1 2002/02/16 17:22:16 pvalchev Exp $
2
3PROG= inf
4SRCS= inf.c
5
6LDADD+= -lm
7DPADD+= ${LIBM}
8
9.include <bsd.regress.mk>
diff --git a/src/regress/lib/libc/ieeefp/inf/inf.c b/src/regress/lib/libc/ieeefp/inf/inf.c
deleted file mode 100644
index a1956145a6..0000000000
--- a/src/regress/lib/libc/ieeefp/inf/inf.c
+++ /dev/null
@@ -1,16 +0,0 @@
1/* $OpenBSD: inf.c,v 1.3 2003/07/31 21:48:03 deraadt Exp $ */
2
3/*
4 * Peter Valchev <pvalchev@openbsd.org> Public Domain, 2002.
5 */
6
7#include <math.h>
8
9int
10main(int argc, char *argv[])
11{
12 if (isinf(HUGE_VAL))
13 return 0;
14
15 return 1;
16}
diff --git a/src/regress/lib/libc/ieeefp/infinity/Makefile b/src/regress/lib/libc/ieeefp/infinity/Makefile
deleted file mode 100644
index ac102d8a63..0000000000
--- a/src/regress/lib/libc/ieeefp/infinity/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
1# $OpenBSD: Makefile,v 1.2 2004/01/16 19:34:37 miod Exp $
2
3PROG= infinity
4
5DPADD+= ${LIBM}
6LDADD+= -lm
7
8REGRESS_TARGETS+= add mult neg pumpkin
9
10add: ${PROG}
11 ./${PROG} -a
12
13mult: ${PROG}
14 ./${PROG} -m
15
16neg: ${PROG}
17 ./${PROG} -n
18
19pumpkin: ${PROG}
20 ./${PROG} -p
21
22.include <bsd.regress.mk>
diff --git a/src/regress/lib/libc/ieeefp/infinity/infinity.c b/src/regress/lib/libc/ieeefp/infinity/infinity.c
deleted file mode 100644
index 3b1b71ec90..0000000000
--- a/src/regress/lib/libc/ieeefp/infinity/infinity.c
+++ /dev/null
@@ -1,77 +0,0 @@
1/* $OpenBSD: infinity.c,v 1.2 2004/01/16 19:34:37 miod Exp $ */
2/*
3 * Written by Miodrag Vallat, 2004 - Public Domain
4 * Inspired from Perl's t/op/arith test #134
5 */
6
7#include <math.h>
8#include <signal.h>
9#include <unistd.h>
10
11void
12sigfpe(int signum)
13{
14 /* looks like we don't handle fp overflow correctly... */
15 _exit(1);
16}
17
18int
19main(int argc, char *argv[])
20{
21 int opt;
22 double d, two;
23 int i;
24 char method = 'a';
25
26 while ((opt = getopt(argc, argv, "amnp")) != -1)
27 method = (char)opt;
28
29 signal(SIGFPE, sigfpe);
30
31 switch (method) {
32 case 'a':
33 /* try to produce +Inf through addition */
34 d = 1.0;
35 for (i = 2000; i != 0; i--) {
36 d = d + d;
37 }
38 /* result should be _positive_ infinity */
39 if (!isinf(d) || copysign(1.0, d) < 0.0)
40 return (1);
41 break;
42 case 'm':
43 /* try to produce +Inf through multiplication */
44 d = 1.0;
45 two = 2.0;
46 for (i = 2000; i != 0; i--) {
47 d = d * two;
48 }
49 /* result should be _positive_ infinity */
50 if (!isinf(d) || copysign(1.0, d) < 0.0)
51 return (1);
52 break;
53 case 'n':
54 /* try to produce -Inf through subtraction */
55 d = -1.0;
56 for (i = 2000; i != 0; i--) {
57 d = d + d;
58 }
59 /* result should be _negative_ infinity */
60 if (!isinf(d) || copysign(1.0, d) > 0.0)
61 return (1);
62 break;
63 case 'p':
64 /* try to produce -Inf through multiplication */
65 d = -1.0;
66 two = 2.0;
67 for (i = 2000; i != 0; i--) {
68 d = d * two;
69 }
70 /* result should be _negative_ infinity */
71 if (!isinf(d) || copysign(1.0, d) > 0.0)
72 return (1);
73 break;
74 }
75
76 return (0);
77}