summaryrefslogtreecommitdiff
path: root/regress/lib/libm/rint
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-11-17 20:10:00 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-11-17 20:10:00 +0000
commit775cde31e9d51f1d71b4a42237c3853f1afd6ea1 (patch)
tree93f60a546ff1b3e10c2a87c775c19d089dd90fec /regress/lib/libm/rint
parent634b9611f69bc903d28767f9136ac135bb18062d (diff)
Test a few more rint functions.
Diffstat (limited to 'regress/lib/libm/rint')
-rw-r--r--regress/lib/libm/rint/rint.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/regress/lib/libm/rint/rint.c b/regress/lib/libm/rint/rint.c
index 70388a228a4..e685152bf24 100644
--- a/regress/lib/libm/rint/rint.c
+++ b/regress/lib/libm/rint/rint.c
@@ -1,7 +1,8 @@
-/* $OpenBSD: rint.c,v 1.4 2003/09/02 23:52:17 david Exp $ */
+/* $OpenBSD: rint.c,v 1.5 2005/11/17 20:09:59 otto Exp $ */
/* Written by Michael Shalayeff, 2003, Public domain. */
+#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -33,7 +34,17 @@ main(int argc, char *argv[])
sigaction(SIGFPE, &sa, NULL);
if (rint(8.6) != 9.)
- exit(1);
+ err(1, "rint");
+ if (rintf(8.6F) != 9)
+ err(1, "rintf");
+ if (lrint(8.6) != 9L)
+ err(1, "lrint");
+ if (lrintf(8.6F) != 9L)
+ err(1, "lrintf");
+ if (llrint(8.6) != 9LL)
+ err(1, "llrint");
+ if (llrintf(8.6F) != 9LL)
+ err(1, "llrintf");
exit(0);
}