I've noticed that Glibc prefers to use hex representation for float values, to ensure an accurate representation. If you care to do so, here they are:
static float f32_numbers[] = {
-SNANF,
-NAN,
-INFINITY,
-FLT_MAX,
-0x1.1874b2p+103,
-0x1.c0bab6p+99,
-0x1.31f75p-40,
-0x1.505444p-66,
-FLT_MIN,
0.0,
FLT_MIN,
0x1p-25,
0x1.ffffe6p-25, /* min positive FP16 subnormal */
0x1.ff801ap-15, /* max subnormal FP16 */
0x1.00000cp-14, /* min positive normal FP16 */
1.0,
0x1.004p+0, /* smallest float after 1.0 FP16 */
2.0,
M_E, M_PI,
0x1.ffbep+15,
0x1.ffcp+15, /* max FP16 */
0x1.ffc2p+15,
0x1.ffbfp+16,
0x1.ffcp+16, /* max AFP */
0x1.ffc1p+16,
0x1.c0bab6p+99,
FLT_MAX,
INFINITY,
NAN,
SNANF
};
On 9/13/19 8:49 AM, Alex Bennée wrote:
> +static float f32_numbers[] = {
> + -SNANF,
> + -NAN,
> + -INFINITY,
> + -FLT_MAX,
> + -1.111E+31,
> + -1.111E+30,
> + -1.08700982e-12,
> + -1.78051176e-20,
> + -FLT_MIN,
> + 0.0,
> + FLT_MIN,
> + 2.98023224e-08,
> + 5.96046E-8, /* min positive FP16 subnormal */
> + 6.09756E-5, /* max subnormal FP16 */
> + 6.10352E-5, /* min positive normal FP16 */
> + 1.0,
> + 1.0009765625, /* smallest float after 1.0 FP16 */
> + 2.0,
> + M_E, M_PI,
> + 65503.0,
> + 65504.0, /* max FP16 */
> + 65505.0,
> + 131007.0,
> + 131008.0, /* max AFP */
> + 131009.0,
> + 1.111E+30,
> + FLT_MAX,
> + INFINITY,
> + NAN,
> + SNANF
> +};
I've noticed that Glibc prefers to use hex representation for float values, to ensure an accurate representation. If you care to do so, here they are: 1874b2p+ 103, c0bab6p+ 99, 505444p- 66,
static float f32_numbers[] = {
-SNANF,
-NAN,
-INFINITY,
-FLT_MAX,
-0x1.
-0x1.
-0x1.31f75p-40,
-0x1.
-FLT_MIN,
0.0,
FLT_MIN,
0x1p-25,
0x1.ffffe6p-25, /* min positive FP16 subnormal */
0x1.ff801ap-15, /* max subnormal FP16 */
0x1.00000cp-14, /* min positive normal FP16 */
1.0,
0x1.004p+0, /* smallest float after 1.0 FP16 */
2.0,
M_E, M_PI,
0x1.ffbep+15,
0x1.ffcp+15, /* max FP16 */
0x1.ffc2p+15,
0x1.ffbfp+16,
0x1.ffcp+16, /* max AFP */
0x1.ffc1p+16,
0x1.c0bab6p+99,
FLT_MAX,
INFINITY,
NAN,
SNANF
};
PC