projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #5608 from mono/xcode9_bockbuild_fix
[mono.git]
/
mono
/
mini
/
basic-float.cs
diff --git
a/mono/mini/basic-float.cs
b/mono/mini/basic-float.cs
index 0eb1e240bc5348d18f4d81badc38b476dee69152..e6a14456f95e4a3750f7d6247cf3fb97851a5fa4 100644
(file)
--- a/
mono/mini/basic-float.cs
+++ b/
mono/mini/basic-float.cs
@@
-26,14
+26,14
@@
using System.Reflection;
/* A comparison made to same variable. */
#pragma warning disable 1718
/* A comparison made to same variable. */
#pragma warning disable 1718
-#if
MOBILE
+#if
__MOBILE__
class FloatTests
#else
class Tests
#endif
{
class FloatTests
#else
class Tests
#endif
{
-#if !
MOBILE
+#if !
__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
@@
-631,8
+631,8
@@
class Tests
public static int test_0_float_precision () {
float f1 = 3.40282346638528859E+38f;
float f2 = 3.40282346638528859E+38f;
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;
}
return f == PositiveInfinity ? 0 : 1;
}