summaryrefslogtreecommitdiff
path: root/test/math/rint.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/math/rint.c')
-rw-r--r--test/math/rint.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/math/rint.c b/test/math/rint.c
new file mode 100644
index 000000000..399fb90e3
--- /dev/null
+++ b/test/math/rint.c
@@ -0,0 +1,11 @@
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(void) {
+ double d1, d2;
+ d1 = 0.6; d2 = rint(d1);
+ printf("d1 = %f, d2 = %f\n", d1, d2);
+ return 0;
+}
+