diff options
author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
commit | eb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch) | |
tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/regress/lib/libc/ieeefp/round | |
parent | 247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff) | |
download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/regress/lib/libc/ieeefp/round')
-rw-r--r-- | src/regress/lib/libc/ieeefp/round/Makefile | 5 | ||||
-rw-r--r-- | src/regress/lib/libc/ieeefp/round/round.c | 45 |
2 files changed, 0 insertions, 50 deletions
diff --git a/src/regress/lib/libc/ieeefp/round/Makefile b/src/regress/lib/libc/ieeefp/round/Makefile deleted file mode 100644 index 9ea6dd8c39..0000000000 --- a/src/regress/lib/libc/ieeefp/round/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.4 2002/02/18 11:25:34 art Exp $ | ||
2 | |||
3 | PROG= round | ||
4 | |||
5 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libc/ieeefp/round/round.c b/src/regress/lib/libc/ieeefp/round/round.c deleted file mode 100644 index 807941ea56..0000000000 --- a/src/regress/lib/libc/ieeefp/round/round.c +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | /* $OpenBSD: round.c,v 1.3 2003/07/31 21:48:03 deraadt Exp $ */ | ||
2 | /* $NetBSD: round.c,v 1.1 1995/04/26 00:27:28 jtc Exp $ */ | ||
3 | |||
4 | /* | ||
5 | * Written by J.T. Conklin, Apr 18, 1995 | ||
6 | * Public domain. | ||
7 | */ | ||
8 | |||
9 | #include <assert.h> | ||
10 | #include <stdlib.h> | ||
11 | #include <ieeefp.h> | ||
12 | #include <float.h> | ||
13 | |||
14 | int | ||
15 | main(int argc, char *argv[]) | ||
16 | { | ||
17 | /* | ||
18 | * This test would be better if it actually performed some | ||
19 | * calculations to verify the selected rounding mode. But | ||
20 | * this is probably acceptable since the fp{get,set}round | ||
21 | * functions usually just get or set the processors fpu | ||
22 | * control word. | ||
23 | */ | ||
24 | |||
25 | assert(fpgetround() == FP_RN); | ||
26 | assert(FLT_ROUNDS == 1); | ||
27 | |||
28 | assert(fpsetround(FP_RP) == FP_RN); | ||
29 | assert(fpgetround() == FP_RP); | ||
30 | assert(FLT_ROUNDS == 2); | ||
31 | |||
32 | assert(fpsetround(FP_RM) == FP_RP); | ||
33 | assert(fpgetround() == FP_RM); | ||
34 | assert(FLT_ROUNDS == 3); | ||
35 | |||
36 | assert(fpsetround(FP_RZ) == FP_RM); | ||
37 | assert(fpgetround() == FP_RZ); | ||
38 | assert(FLT_ROUNDS == 0); | ||
39 | |||
40 | assert(fpsetround(FP_RN) == FP_RZ); | ||
41 | assert(fpgetround() == FP_RN); | ||
42 | assert(FLT_ROUNDS == 1); | ||
43 | |||
44 | exit(0); | ||
45 | } | ||