+ public static int test_0_float_precision () {
+ float f1 = 3.40282346638528859E+38f;
+ float f2 = 3.40282346638528859E+38f;
+ float PositiveInfinity = 1.0f / 0.0f;
+ float f = f1 + f2;
+
+ return f == PositiveInfinity ? 0 : 1;
+ }
+
+ /*
+ Disabled until they can be fixed to run on amd64
+
+ static double VALUE = 0.19975845134874831D;
+
+ public static int test_0_float_conversion_reduces_double_precision () {
+ double d = (float)VALUE;
+ if (d != 0.19975845515727997d)
+ return 1;
+
+ return 0;
+ }
+
+
+ public static int test_0_long_to_double_conversion ()
+ {
+ long l = 9223372036854775807L;
+ long conv = (long)((double)l);
+ if (conv != -9223372036854775808L)
+ return 1;
+
+ return 0;
+ }
+
+ public static int INT_VAL = 0x13456799;
+
+ public static int test_0_int4_to_float_convertion ()
+ {
+ double d = (double)(float)INT_VAL;
+
+ if (d != 323315616)
+ return 1;
+ return 0;
+ }
+ */