about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2023-10-25 20:14:11 +0800
committerGitHub <noreply@github.com>2023-10-25 14:14:11 +0200
commit87bf751b115267d7c388c849c43fca6d3f0d0881 (patch)
treeedc6f3976538daf8dd1d9a49694d4bda19ef591d /tests
parent12c40a5b804143cee0d538c4de4b526522bcfcd2 (diff)
downloadbox64-87bf751b115267d7c388c849c43fca6d3f0d0881.tar.gz
box64-87bf751b115267d7c388c849c43fca6d3f0d0881.zip
[INTERP] Fix fpu_round (#1030)
* [INTERP] Fix fpu_round

* Should be working this time

* Handling wrappedlibm

* Format

* Fix loongarch

* Make it optional

* Fix android build
Diffstat (limited to 'tests')
-rw-r--r--tests/ref26.txt640
-rwxr-xr-xtests/test26bin0 -> 40912 bytes
-rw-r--r--tests/test26.c104
3 files changed, 744 insertions, 0 deletions
diff --git a/tests/ref26.txt b/tests/ref26.txt
new file mode 100644
index 00000000..df60c725
--- /dev/null
+++ b/tests/ref26.txt
@@ -0,0 +1,640 @@
+Testing rint(1.000000)
+FE_UPWARD: 1.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing rint(1.300000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing rint(1.500000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rint(1.800000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rint(2.000000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rint(2.300000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rint(2.500000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rint(2.800000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 3.0
+Current rounding mode: 0x0
+
+Testing rintf(1.000000)
+FE_UPWARD: 1.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing rintf(1.300000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing rintf(1.500000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rintf(1.800000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rintf(2.000000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rintf(2.300000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rintf(2.500000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing rintf(2.800000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 3.0
+Current rounding mode: 0x0
+
+Testing nearbyint(1.000000)
+FE_UPWARD: 1.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing nearbyint(1.300000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing nearbyint(1.500000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyint(1.800000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyint(2.000000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyint(2.300000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyint(2.500000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyint(2.800000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 3.0
+Current rounding mode: 0x0
+
+Testing nearbyintf(1.000000)
+FE_UPWARD: 1.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing nearbyintf(1.300000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing nearbyintf(1.500000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyintf(1.800000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyintf(2.000000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyintf(2.300000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyintf(2.500000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing nearbyintf(2.800000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 3.0
+Current rounding mode: 0x0
+
+Testing llrintf(1.000000)
+FE_UPWARD: 1.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing llrintf(1.300000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing llrintf(1.500000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrintf(1.800000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrintf(2.000000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrintf(2.300000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrintf(2.500000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrintf(2.800000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 3.0
+Current rounding mode: 0x0
+
+Testing llrint(1.000000)
+FE_UPWARD: 1.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing llrint(1.300000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing llrint(1.500000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrint(1.800000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrint(2.000000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrint(2.300000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrint(2.500000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing llrint(2.800000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 3.0
+Current rounding mode: 0x0
+
+Testing lrintf(1.000000)
+FE_UPWARD: 1.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing lrintf(1.300000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing lrintf(1.500000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrintf(1.800000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrintf(2.000000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrintf(2.300000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrintf(2.500000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrintf(2.800000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 3.0
+Current rounding mode: 0x0
+
+Testing lrint(1.000000)
+FE_UPWARD: 1.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing lrint(1.300000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 1.0
+Current rounding mode: 0x0
+
+Testing lrint(1.500000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrint(1.800000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 1.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 1.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrint(2.000000)
+FE_UPWARD: 2.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrint(2.300000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrint(2.500000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 2.0
+Current rounding mode: 0x0
+
+Testing lrint(2.800000)
+FE_UPWARD: 3.0
+Current rounding mode: 0x800
+FE_DOWNWARD: 2.0
+Current rounding mode: 0x400
+FE_TOWARDZERO: 2.0
+Current rounding mode: 0xc00
+FE_TONEAREST: 3.0
+Current rounding mode: 0x0
+
diff --git a/tests/test26 b/tests/test26
new file mode 100755
index 00000000..a6fb3ea6
--- /dev/null
+++ b/tests/test26
Binary files differdiff --git a/tests/test26.c b/tests/test26.c
new file mode 100644
index 00000000..64f1b45f
--- /dev/null
+++ b/tests/test26.c
@@ -0,0 +1,104 @@
+#include <stdio.h>
+#include <fenv.h>
+#include <math.h>
+// Build with `gcc -march=core2 -O0 test26.c -o test26 -lm`
+
+#define TEST(fn, val)                                      \
+    printf("Testing %s(%f)\n", #fn, val);                  \
+    fesetround(FE_UPWARD);                                 \
+    printf("FE_UPWARD: %.1f\n", (double)fn(val));          \
+    printf("Current rounding mode: 0x%x\n", fegetround()); \
+    fesetround(FE_DOWNWARD);                               \
+    printf("FE_DOWNWARD: %.1f\n", (double)fn(val));        \
+    printf("Current rounding mode: 0x%x\n", fegetround()); \
+    fesetround(FE_TOWARDZERO);                             \
+    printf("FE_TOWARDZERO: %.1f\n", (double)fn(val));      \
+    printf("Current rounding mode: 0x%x\n", fegetround()); \
+    fesetround(FE_TONEAREST);                              \
+    printf("FE_TONEAREST: %.1f\n", (double)fn(val));       \
+    printf("Current rounding mode: 0x%x\n\n", fegetround());
+
+int main()
+{
+    TEST(rint, 1.0f);
+    TEST(rint, 1.3f);
+    TEST(rint, 1.5f);
+    TEST(rint, 1.8f);
+
+    TEST(rint, 2.0f);
+    TEST(rint, 2.3f);
+    TEST(rint, 2.5f);
+    TEST(rint, 2.8f);
+
+    TEST(rintf, 1.0f);
+    TEST(rintf, 1.3f);
+    TEST(rintf, 1.5f);
+    TEST(rintf, 1.8f);
+
+    TEST(rintf, 2.0f);
+    TEST(rintf, 2.3f);
+    TEST(rintf, 2.5f);
+    TEST(rintf, 2.8f);
+
+    TEST(nearbyint, 1.0f);
+    TEST(nearbyint, 1.3f);
+    TEST(nearbyint, 1.5f);
+    TEST(nearbyint, 1.8f);
+
+    TEST(nearbyint, 2.0f);
+    TEST(nearbyint, 2.3f);
+    TEST(nearbyint, 2.5f);
+    TEST(nearbyint, 2.8f);
+
+    TEST(nearbyintf, 1.0f);
+    TEST(nearbyintf, 1.3f);
+    TEST(nearbyintf, 1.5f);
+    TEST(nearbyintf, 1.8f);
+
+    TEST(nearbyintf, 2.0f);
+    TEST(nearbyintf, 2.3f);
+    TEST(nearbyintf, 2.5f);
+    TEST(nearbyintf, 2.8f);
+
+    TEST(llrintf, 1.0f);
+    TEST(llrintf, 1.3f);
+    TEST(llrintf, 1.5f);
+    TEST(llrintf, 1.8f);
+
+    TEST(llrintf, 2.0f);
+    TEST(llrintf, 2.3f);
+    TEST(llrintf, 2.5f);
+    TEST(llrintf, 2.8f);
+
+    TEST(llrint, 1.0f);
+    TEST(llrint, 1.3f);
+    TEST(llrint, 1.5f);
+    TEST(llrint, 1.8f);
+
+    TEST(llrint, 2.0f);
+    TEST(llrint, 2.3f);
+    TEST(llrint, 2.5f);
+    TEST(llrint, 2.8f);
+
+    TEST(lrintf, 1.0f);
+    TEST(lrintf, 1.3f);
+    TEST(lrintf, 1.5f);
+    TEST(lrintf, 1.8f);
+
+    TEST(lrintf, 2.0f);
+    TEST(lrintf, 2.3f);
+    TEST(lrintf, 2.5f);
+    TEST(lrintf, 2.8f);
+
+    TEST(lrint, 1.0f);
+    TEST(lrint, 1.3f);
+    TEST(lrint, 1.5f);
+    TEST(lrint, 1.8f);
+
+    TEST(lrint, 2.0f);
+    TEST(lrint, 2.3f);
+    TEST(lrint, 2.5f);
+    TEST(lrint, 2.8f);
+
+    return 0;
+}