#define ARRAY_SIZE 128
-float in[ARRAY_SIZE];
-long out[ARRAY_SIZE];
-long ref[ARRAY_SIZE];
+double in[ARRAY_SIZE];
+int out[ARRAY_SIZE];
+int ref[ARRAY_SIZE];
-TEST_UNARY_CALL_CVT (float, long, __builtin_lrintf)
-TEST_ASSERT (long)
+TEST_UNARY_CALL_CVT (double, int, __builtin_irint)
+TEST_ASSERT (int)
-TEST_INIT_CVT (float, 1.2, long, __builtin_lrintf (1.2), 1)
-TEST_INIT_CVT (float, -1.2, long, __builtin_lrintf (-1.2), 2)
-TEST_INIT_CVT (float, 0.5, long, __builtin_lrintf (0.5), 3)
-TEST_INIT_CVT (float, -0.5, long, __builtin_lrintf (-0.5), 4)
-TEST_INIT_CVT (float, 0.1, long, __builtin_lrintf (0.1), 5)
-TEST_INIT_CVT (float, -0.1, long, __builtin_lrintf (-0.1), 6)
-TEST_INIT_CVT (float, 3.0, long, __builtin_lrintf (3.0), 7)
-TEST_INIT_CVT (float, -3.0, long, __builtin_lrintf (-3.0), 8)
-TEST_INIT_CVT (float, 4503599627370495.5, long, __builtin_lrintf (4503599627370495.5), 9)
-TEST_INIT_CVT (float, 4503599627370497.0, long, __builtin_lrintf (4503599627370497.0), 10)
-TEST_INIT_CVT (float, -4503599627370495.5, long, __builtin_lrintf (-4503599627370495.5), 11)
-TEST_INIT_CVT (float, -4503599627370496.0, long, __builtin_lrintf (-4503599627370496.0), 12)
-TEST_INIT_CVT (float, 0.0, long, __builtin_lrintf (-0.0), 13)
-TEST_INIT_CVT (float, -0.0, long, __builtin_lrintf (-0.0), 14)
-TEST_INIT_CVT (float, 9223372036854774784.0, long, __builtin_lrintf (9223372036854774784.0), 15)
-TEST_INIT_CVT (float, 9223372036854775808.0, long, __builtin_lrintf (9223372036854775808.0), 16)
-TEST_INIT_CVT (float, -9223372036854775808.0, long, __builtin_lrintf (-9223372036854775808.0), 17)
-TEST_INIT_CVT (float, -9223372036854777856.0, long, __builtin_lrintf (-9223372036854777856.0), 18)
-TEST_INIT_CVT (float, __builtin_inf (), long, __builtin_lrintf (__builtin_inf ()), 19)
-TEST_INIT_CVT (float, -__builtin_inf (), long, __builtin_lrintf (-__builtin_inf ()), 20)
-TEST_INIT_CVT (float, __builtin_nan (""), long, 0x7fffffffffffffff, 21)
+TEST_INIT_CVT (double, 1.2, int, __builtin_irint (1.2), 1)
+TEST_INIT_CVT (double, -1.2, int, __builtin_irint (-1.2), 2)
+TEST_INIT_CVT (double, 0.5, int, __builtin_irint (0.5), 3)
+TEST_INIT_CVT (double, -0.5, int, __builtin_irint (-0.5), 4)
+TEST_INIT_CVT (double, 0.1, int, __builtin_irint (0.1), 5)
+TEST_INIT_CVT (double, -0.1, int, __builtin_irint (-0.1), 6)
+TEST_INIT_CVT (double, 3.0, int, __builtin_irint (3.0), 7)
+TEST_INIT_CVT (double, -3.0, int, __builtin_irint (-3.0), 8)
+TEST_INIT_CVT (double, 4503599627370495.5, int, __builtin_irint (4503599627370495.5), 9)
+TEST_INIT_CVT (double, 4503599627370497.0, int, __builtin_irint (4503599627370497.0), 10)
+TEST_INIT_CVT (double, -4503599627370495.5, int, __builtin_irint (-4503599627370495.5), 11)
+TEST_INIT_CVT (double, -4503599627370496.0, int, __builtin_irint (-4503599627370496.0), 12)
+TEST_INIT_CVT (double, 0.0, int, __builtin_irint (-0.0), 13)
+TEST_INIT_CVT (double, -0.0, int, __builtin_irint (-0.0), 14)
+TEST_INIT_CVT (double, 9223372036854774784.0, int, __builtin_irint (9223372036854774784.0), 15)
+TEST_INIT_CVT (double, 9223372036854775808.0, int, __builtin_irint (9223372036854775808.0), 16)
+TEST_INIT_CVT (double, -9223372036854775808.0, int, __builtin_irint (-9223372036854775808.0), 17)
+TEST_INIT_CVT (double, -9223372036854777856.0, int, __builtin_irint (-9223372036854777856.0), 18)
+TEST_INIT_CVT (double, __builtin_inf (), int, __builtin_irint (__builtin_inf ()), 19)
+TEST_INIT_CVT (double, -__builtin_inf (), int, __builtin_irint (-__builtin_inf ()), 20)
+TEST_INIT_CVT (double, __builtin_nan (""), int, 0x7fffffff, 21)
int
main ()
{
- RUN_TEST_CVT (float, long, 1, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 2, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 3, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 4, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 5, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 6, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 7, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 8, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 9, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 10, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 11, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 12, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 13, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 14, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 15, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 16, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 17, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 18, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 19, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 20, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 21, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 1, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 2, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 3, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 4, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 5, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 6, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 7, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 8, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 9, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 10, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 11, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 12, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 13, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 14, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 15, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 16, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 17, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 18, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 19, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 20, __builtin_irint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, int, 21, __builtin_irint, in, out, ref, ARRAY_SIZE);
return 0;
}
/* { dg-do run { target { riscv_v } } } */
/* { dg-additional-options "-std=c99 -O3 -ftree-vectorize -fno-vect-cost-model -ffast-math" } */
+#include <stdint-gcc.h>
#include "test-math.h"
#define ARRAY_SIZE 128
float in[ARRAY_SIZE];
-long out[ARRAY_SIZE];
-long ref[ARRAY_SIZE];
-
-TEST_UNARY_CALL_CVT (float, long, __builtin_lrintf)
-TEST_ASSERT (long)
-
-TEST_INIT_CVT (float, 1.2, long, __builtin_lrintf (1.2), 1)
-TEST_INIT_CVT (float, -1.2, long, __builtin_lrintf (-1.2), 2)
-TEST_INIT_CVT (float, 0.5, long, __builtin_lrintf (0.5), 3)
-TEST_INIT_CVT (float, -0.5, long, __builtin_lrintf (-0.5), 4)
-TEST_INIT_CVT (float, 0.1, long, __builtin_lrintf (0.1), 5)
-TEST_INIT_CVT (float, -0.1, long, __builtin_lrintf (-0.1), 6)
-TEST_INIT_CVT (float, 3.0, long, __builtin_lrintf (3.0), 7)
-TEST_INIT_CVT (float, -3.0, long, __builtin_lrintf (-3.0), 8)
-TEST_INIT_CVT (float, 4503599627370495.5, long, __builtin_lrintf (4503599627370495.5), 9)
-TEST_INIT_CVT (float, 4503599627370497.0, long, __builtin_lrintf (4503599627370497.0), 10)
-TEST_INIT_CVT (float, -4503599627370495.5, long, __builtin_lrintf (-4503599627370495.5), 11)
-TEST_INIT_CVT (float, -4503599627370496.0, long, __builtin_lrintf (-4503599627370496.0), 12)
-TEST_INIT_CVT (float, 0.0, long, __builtin_lrintf (-0.0), 13)
-TEST_INIT_CVT (float, -0.0, long, __builtin_lrintf (-0.0), 14)
-TEST_INIT_CVT (float, 9223372036854774784.0, long, __builtin_lrintf (9223372036854774784.0), 15)
-TEST_INIT_CVT (float, 9223372036854775808.0, long, __builtin_lrintf (9223372036854775808.0), 16)
-TEST_INIT_CVT (float, -9223372036854775808.0, long, __builtin_lrintf (-9223372036854775808.0), 17)
-TEST_INIT_CVT (float, -9223372036854777856.0, long, __builtin_lrintf (-9223372036854777856.0), 18)
-TEST_INIT_CVT (float, __builtin_inf (), long, __builtin_lrintf (__builtin_inf ()), 19)
-TEST_INIT_CVT (float, -__builtin_inf (), long, __builtin_lrintf (-__builtin_inf ()), 20)
-TEST_INIT_CVT (float, __builtin_nan (""), long, 0x7fffffffffffffff, 21)
+int64_t out[ARRAY_SIZE];
+int64_t ref[ARRAY_SIZE];
+
+TEST_UNARY_CALL_CVT (float, int64_t, __builtin_llrintf)
+TEST_ASSERT (int64_t)
+
+
+TEST_INIT_CVT (float, 1.2, int64_t, __builtin_llrintf (1.2), 1)
+TEST_INIT_CVT (float, -1.2, int64_t, __builtin_llrintf (-1.2), 2)
+TEST_INIT_CVT (float, 0.5, int64_t, __builtin_llrintf (0.5), 3)
+TEST_INIT_CVT (float, -0.5, int64_t, __builtin_llrintf (-0.5), 4)
+TEST_INIT_CVT (float, 0.1, int64_t, __builtin_llrintf (0.1), 5)
+TEST_INIT_CVT (float, -0.1, int64_t, __builtin_llrintf (-0.1), 6)
+TEST_INIT_CVT (float, 3.0, int64_t, __builtin_llrintf (3.0), 7)
+TEST_INIT_CVT (float, -3.0, int64_t, __builtin_llrintf (-3.0), 8)
+TEST_INIT_CVT (float, 2147483520.0, int64_t, __builtin_llrintf (2147483520.0), 9)
+TEST_INIT_CVT (float, 2147483648.0, int64_t, __builtin_llrintf (2147483648.0), 10)
+TEST_INIT_CVT (float, -2147483648.0, int64_t, __builtin_llrintf (-2147483648.0), 11)
+TEST_INIT_CVT (float, -2147483904.0, int64_t, __builtin_llrintf (-2147483904.0), 12)
+TEST_INIT_CVT (float, 0.0, int64_t, __builtin_llrintf (-0.0), 13)
+TEST_INIT_CVT (float, -0.0, int64_t, __builtin_llrintf (-0.0), 14)
+TEST_INIT_CVT (float, 9223372036854775807.0, int64_t, __builtin_llrintf (9223372036854775807.0), 15)
+TEST_INIT_CVT (float, 9223373136366403584.0, int64_t, __builtin_llrintf (9223373136366403584.0), 16)
+TEST_INIT_CVT (float, -9223372036854775807.0, int64_t, __builtin_llrintf (-9223372036854775807.0), 17)
+TEST_INIT_CVT (float, -9223373136366403584.0, int64_t, __builtin_llrintf (-9223373136366403584.0), 18)
+TEST_INIT_CVT (float, __builtin_inf (), int64_t, __builtin_llrintf (__builtin_inff ()), 19)
+TEST_INIT_CVT (float, -__builtin_inf (), int64_t, __builtin_llrintf (-__builtin_inff ()), 20)
+TEST_INIT_CVT (float, __builtin_nanf (""), int64_t, 0x7fffffffffffffff, 21)
int
main ()
{
- RUN_TEST_CVT (float, long, 1, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 2, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 3, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 4, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 5, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 6, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 7, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 8, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 9, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 10, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 11, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 12, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 13, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 14, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 15, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 16, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 17, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 18, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 19, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 20, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 21, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 1, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 2, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 3, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 4, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 5, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 6, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 7, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 8, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 9, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 10, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 11, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 12, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 13, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 14, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 15, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 16, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 17, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 18, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 19, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 20, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (float, int64_t, 21, __builtin_llrintf, in, out, ref, ARRAY_SIZE);
return 0;
}
#define ARRAY_SIZE 128
-float in[ARRAY_SIZE];
+double in[ARRAY_SIZE];
long out[ARRAY_SIZE];
long ref[ARRAY_SIZE];
-TEST_UNARY_CALL_CVT (float, long, __builtin_lrintf)
+TEST_UNARY_CALL_CVT (double, long, __builtin_lrint)
TEST_ASSERT (long)
-TEST_INIT_CVT (float, 1.2, long, __builtin_lrintf (1.2), 1)
-TEST_INIT_CVT (float, -1.2, long, __builtin_lrintf (-1.2), 2)
-TEST_INIT_CVT (float, 0.5, long, __builtin_lrintf (0.5), 3)
-TEST_INIT_CVT (float, -0.5, long, __builtin_lrintf (-0.5), 4)
-TEST_INIT_CVT (float, 0.1, long, __builtin_lrintf (0.1), 5)
-TEST_INIT_CVT (float, -0.1, long, __builtin_lrintf (-0.1), 6)
-TEST_INIT_CVT (float, 3.0, long, __builtin_lrintf (3.0), 7)
-TEST_INIT_CVT (float, -3.0, long, __builtin_lrintf (-3.0), 8)
-TEST_INIT_CVT (float, 4503599627370495.5, long, __builtin_lrintf (4503599627370495.5), 9)
-TEST_INIT_CVT (float, 4503599627370497.0, long, __builtin_lrintf (4503599627370497.0), 10)
-TEST_INIT_CVT (float, -4503599627370495.5, long, __builtin_lrintf (-4503599627370495.5), 11)
-TEST_INIT_CVT (float, -4503599627370496.0, long, __builtin_lrintf (-4503599627370496.0), 12)
-TEST_INIT_CVT (float, 0.0, long, __builtin_lrintf (-0.0), 13)
-TEST_INIT_CVT (float, -0.0, long, __builtin_lrintf (-0.0), 14)
-TEST_INIT_CVT (float, 9223372036854774784.0, long, __builtin_lrintf (9223372036854774784.0), 15)
-TEST_INIT_CVT (float, 9223372036854775808.0, long, __builtin_lrintf (9223372036854775808.0), 16)
-TEST_INIT_CVT (float, -9223372036854775808.0, long, __builtin_lrintf (-9223372036854775808.0), 17)
-TEST_INIT_CVT (float, -9223372036854777856.0, long, __builtin_lrintf (-9223372036854777856.0), 18)
-TEST_INIT_CVT (float, __builtin_inf (), long, __builtin_lrintf (__builtin_inf ()), 19)
-TEST_INIT_CVT (float, -__builtin_inf (), long, __builtin_lrintf (-__builtin_inf ()), 20)
-TEST_INIT_CVT (float, __builtin_nan (""), long, 0x7fffffffffffffff, 21)
+TEST_INIT_CVT (double, 1.2, long, __builtin_lrint (1.2), 1)
+TEST_INIT_CVT (double, -1.2, long, __builtin_lrint (-1.2), 2)
+TEST_INIT_CVT (double, 0.5, long, __builtin_lrint (0.5), 3)
+TEST_INIT_CVT (double, -0.5, long, __builtin_lrint (-0.5), 4)
+TEST_INIT_CVT (double, 0.1, long, __builtin_lrint (0.1), 5)
+TEST_INIT_CVT (double, -0.1, long, __builtin_lrint (-0.1), 6)
+TEST_INIT_CVT (double, 3.0, long, __builtin_lrint (3.0), 7)
+TEST_INIT_CVT (double, -3.0, long, __builtin_lrint (-3.0), 8)
+TEST_INIT_CVT (double, 4503599627370495.5, long, __builtin_lrint (4503599627370495.5), 9)
+TEST_INIT_CVT (double, 4503599627370497.0, long, __builtin_lrint (4503599627370497.0), 10)
+TEST_INIT_CVT (double, -4503599627370495.5, long, __builtin_lrint (-4503599627370495.5), 11)
+TEST_INIT_CVT (double, -4503599627370496.0, long, __builtin_lrint (-4503599627370496.0), 12)
+TEST_INIT_CVT (double, 0.0, long, __builtin_lrint (-0.0), 13)
+TEST_INIT_CVT (double, -0.0, long, __builtin_lrint (-0.0), 14)
+TEST_INIT_CVT (double, 9223372036854774784.0, long, __builtin_lrint (9223372036854774784.0), 15)
+TEST_INIT_CVT (double, 9223372036854775808.0, long, __builtin_lrint (9223372036854775808.0), 16)
+TEST_INIT_CVT (double, -9223372036854775808.0, long, __builtin_lrint (-9223372036854775808.0), 17)
+TEST_INIT_CVT (double, -9223372036854777856.0, long, __builtin_lrint (-9223372036854777856.0), 18)
+TEST_INIT_CVT (double, __builtin_inf (), long, __builtin_lrint (__builtin_inf ()), 19)
+TEST_INIT_CVT (double, -__builtin_inf (), long, __builtin_lrint (-__builtin_inf ()), 20)
+TEST_INIT_CVT (double, __builtin_nan (""), long, 0x7fffffff, 21)
int
main ()
{
- RUN_TEST_CVT (float, long, 1, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 2, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 3, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 4, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 5, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 6, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 7, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 8, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 9, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 10, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 11, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 12, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 13, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 14, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 15, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 16, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 17, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 18, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 19, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 20, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
- RUN_TEST_CVT (float, long, 21, __builtin_lrintf, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 1, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 2, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 3, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 4, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 5, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 6, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 7, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 8, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 9, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 10, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 11, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 12, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 13, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 14, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 15, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 16, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 17, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 18, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 19, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 20, __builtin_lrint, in, out, ref, ARRAY_SIZE);
+ RUN_TEST_CVT (double, long, 21, __builtin_lrint, in, out, ref, ARRAY_SIZE);
return 0;
}