2003-07-17 Peter Williams <peter@newton.cx>
authorPeter Williams <peterw@mono-cvs.ximian.com>
Fri, 18 Jul 2003 04:15:46 +0000 (04:15 -0000)
committerPeter Williams <peterw@mono-cvs.ximian.com>
Fri, 18 Jul 2003 04:15:46 +0000 (04:15 -0000)
* Mono.Data.SybaseTypes/SybaseDecimal.cs: csc.exe is more
stringent about namespaces than mcs. We need to disambiguate
System.Math from Mono.Math here.

svn path=/trunk/mcs/; revision=16373

mcs/class/Mono.Data.SybaseClient/ChangeLog
mcs/class/Mono.Data.SybaseClient/Mono.Data.SybaseTypes/SybaseDecimal.cs

index d85a6fb97d9eba5215da243375e8392261fcec74..6c7feaae7db6fbc932094256f39e49e7b327be36 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-17  Peter Williams  <peter@newton.cx>
+
+       * Mono.Data.SybaseTypes/SybaseDecimal.cs: csc.exe is more
+       stringent about namespaces than mcs. We need to disambiguate
+       System.Math from Mono.Math here.
+
 2003-06-11  Tim Coleman <tim@timcoleman.com>
        * SybaseConnection.cs:
                Make connection parameter parsing "more correct"
index 0a8118c69c22f4626e5cf293beac2c87f469085c..62eb4a40e832a38b253c2f49bea776139c517e7e 100644 (file)
@@ -92,7 +92,7 @@ namespace Mono.Data.SybaseTypes {
 
                        if (precision < scale)
                                throw new ArgumentException ("Invalid scale");
-                       if (this.ToDouble () > (Math.Pow (10, 38) -1) || this.ToDouble () < -(Math.Pow (10, 38)))
+                       if (this.ToDouble () > (System.Math.Pow (10, 38) -1) || this.ToDouble () < -(System.Math.Pow (10, 38)))
                                throw new SybaseTypeException ("Can't convert to SybaseDecimal.");
                }
 
@@ -287,15 +287,15 @@ namespace Mono.Data.SybaseTypes {
                {
                        if (n.IsNull)
                                return SybaseDecimal.Null;
-                       return new SybaseDecimal (Math.Pow (n.ToDouble (), exp));
+                       return new SybaseDecimal (System.Math.Pow (n.ToDouble (), exp));
                }
 
                public static SybaseDecimal Round (SybaseDecimal n, int position)
                {
                        if (n.IsNull)
                                throw new SybaseNullValueException ();
-                       SybaseDecimal result = new SybaseDecimal (Math.Round ((double) (n.ToDouble () * Math.Pow (10, position))));
-                       result = result / new SybaseDecimal (Math.Pow (10, position));
+                       SybaseDecimal result = new SybaseDecimal (System.Math.Round ((double) (n.ToDouble () * System.Math.Pow (10, position))));
+                       result = result / new SybaseDecimal (System.Math.Pow (10, position));
                        return result;
                }
 
@@ -328,10 +328,10 @@ namespace Mono.Data.SybaseTypes {
                {
                        // FIXME: This is the wrong way to do this
                        double d = (uint) this.Data [0];
-                       d += ((uint) this.Data [1]) * Math.Pow (2, 32);
-                       d += ((uint) this.Data [2]) * Math.Pow (2, 64);
-                       d += ((uint) this.Data [3]) * Math.Pow (2, 96);
-                       d /= Math.Pow (10, scale);
+                       d += ((uint) this.Data [1]) * System.Math.Pow (2, 32);
+                       d += ((uint) this.Data [2]) * System.Math.Pow (2, 64);
+                       d += ((uint) this.Data [3]) * System.Math.Pow (2, 96);
+                       d /= System.Math.Pow (10, scale);
                        return d;
                }
 
@@ -469,7 +469,7 @@ namespace Mono.Data.SybaseTypes {
                        if (r >= 5)
                                lo += 1;
                
-                       while ((((double) hi) * Math.Pow (2, 64) + lo) - Math.Pow (10, prec) > 0)
+                       while ((((double) hi) * System.Math.Pow (2, 64) + lo) - System.Math.Pow (10, prec) > 0)
                                prec += 1;
 
                        while ((prec + sc) > MaxScale) {