From 87bf751b115267d7c388c849c43fca6d3f0d0881 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Wed, 25 Oct 2023 20:14:11 +0800 Subject: [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 --- tests/ref26.txt | 640 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/test26 | Bin 0 -> 40912 bytes tests/test26.c | 104 +++++++++ 3 files changed, 744 insertions(+) create mode 100644 tests/ref26.txt create mode 100755 tests/test26 create mode 100644 tests/test26.c (limited to 'tests') 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 Binary files /dev/null and b/tests/test26 differ diff --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 +#include +#include +// 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; +} -- cgit 1.4.1