1 /* Test that rounding double to __fp16 happens directly, using an example
2 of a number that would round differently if it went from double to
6 /* { dg-require-effective-target arm_fp16_hw } */
7 /* { dg-require-effective-target arm_fp16_alternative_ok } */
8 /* { dg-options "-std=c99" } */
9 /* { dg-add-options arm_fp16_alternative } */
13 /* The original double value. */
14 #define ORIG 0x1.0020008p0
16 /* The expected (double)((__fp16)ORIG) value. */
17 #define ROUNDED 0x1.0040000p0
34 /* Test that the rounding is correct for static initializers. */
38 /* Test that the rounding is correct for a casted constant expression
39 not in a static initializer. */
44 /* Test that the rounding is correct for a runtime conversion. */