Fix modf and fmod casing for consistency
authorJan Kotas <jkotas@microsoft.com>
Tue, 26 Sep 2017 00:17:20 +0000 (17:17 -0700)
committerJan Kotas <jkotas@microsoft.com>
Wed, 27 Sep 2017 19:44:33 +0000 (12:44 -0700)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
src/mscorlib/shared/System/Math.cs
src/mscorlib/src/System/Math.CoreCLR.cs
src/vm/ecalllist.h

index 174e2f6be51078bc2c275620e9e753d38a3fb771..5c69c84e45a0c0b8a03d0178609006baad52dc93 100644 (file)
@@ -624,7 +624,7 @@ namespace System
 
             double flrTempVal = Floor(a + 0.5);
 
-            if ((a == (Floor(a) + 0.5)) && (fmod(flrTempVal, 2.0) != 0))
+            if ((a == (Floor(a) + 0.5)) && (FMod(flrTempVal, 2.0) != 0))
             {
                 flrTempVal -= 1.0;
             }
@@ -664,7 +664,7 @@ namespace System
 
                 if (mode == MidpointRounding.AwayFromZero)
                 {
-                    var fraction = modf(value, &value);
+                    var fraction = ModF(value, &value);
 
                     if (Abs(fraction) >= 0.5)
                     {
@@ -755,7 +755,7 @@ namespace System
 
         public static unsafe double Truncate(double d)
         {
-            modf(d, &d);
+            ModF(d, &d);
             return d;
         }
 
index d5d9c3d92b58bade1c012ed2ede8bc6b40eea300..92eb5cf525c58a7027c4da2b6edb165addc77e38 100644 (file)
@@ -77,9 +77,9 @@ namespace System
         public static extern double Tanh(double value);
 
         [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern double fmod(double x, double y);
+        private static extern double FMod(double x, double y);
         
         [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern unsafe double modf(double x, double* intptr);
+        private static extern unsafe double ModF(double x, double* intptr);
     }
 }
index 3c8378764f6372c9ea01466e533397d90cb82052..4720b5a11f158d9daa4dac56dbce1f025657109b 100644 (file)
@@ -652,10 +652,10 @@ FCFuncStart(gMathFuncs)
     FCIntrinsic("Cosh", COMDouble::Cosh, CORINFO_INTRINSIC_Cosh)
     FCIntrinsic("Exp", COMDouble::Exp, CORINFO_INTRINSIC_Exp)
     FCIntrinsic("Floor", COMDouble::Floor, CORINFO_INTRINSIC_Floor)
-    FCFuncElement("fmod", COMDouble::FMod)
+    FCFuncElement("FMod", COMDouble::FMod)
     FCFuncElement("Log", COMDouble::Log)
     FCIntrinsic("Log10", COMDouble::Log10, CORINFO_INTRINSIC_Log10)
-    FCFuncElement("modf", COMDouble::ModF)
+    FCFuncElement("ModF", COMDouble::ModF)
     FCIntrinsic("Pow", COMDouble::Pow, CORINFO_INTRINSIC_Pow)
     FCIntrinsic("Sin", COMDouble::Sin, CORINFO_INTRINSIC_Sin)
     FCIntrinsic("Sinh", COMDouble::Sinh, CORINFO_INTRINSIC_Sinh)