[runtime] Add explicit (float) casts to test_0_float_precision () to make the test...
authorZoltan Varga <vargaz@gmail.com>
Mon, 24 Apr 2017 23:13:04 +0000 (19:13 -0400)
committerZoltan Varga <vargaz@gmail.com>
Mon, 24 Apr 2017 23:14:41 +0000 (19:14 -0400)
mono/mini/basic-float.cs

index 9415256e94fd78049813135bd7df3a1b2e723629..e6a14456f95e4a3750f7d6247cf3fb97851a5fa4 100644 (file)
@@ -631,8 +631,8 @@ class Tests
        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;
+               float PositiveInfinity =  (float)(1.0f / 0.0f);
+               float f = (float)(f1 + f2);
 
                return f == PositiveInfinity ? 0 : 1;
        }