public static TdsInt32 Sign (TdsDecimal n) { throw new NotImplementedException (); }
public static TdsDecimal Subtract (TdsDecimal x, TdsDecimal y) { return (x - y); }
public static TdsBoolean NotEquals (TdsDecimal x, TdsDecimal y) { return (x != y); }
public static TdsDecimal Power (TdsDecimal n, double exp) { throw new NotImplementedException (); }
public static TdsBoolean LessThanOrEqual (TdsDecimal x, TdsDecimal y) { return (x <= y); }
public static TdsDecimal Multiply (TdsDecimal x, TdsDecimal y) { return (x * y); }
public static TdsBoolean GreaterThanOrEqual (TdsDecimal x, TdsDecimal y) { return (x >= y); }
public static TdsDecimal AdjustScale (TdsDecimal n, int digits, bool fRound) { throw new NotImplementedException (); }
public static TdsDecimal Floor (TdsDecimal n) { throw new NotImplementedException (); }
public static TdsBoolean GreaterThan (TdsDecimal x, TdsDecimal y) { return (x > y); }
public static TdsDecimal Divide (TdsDecimal x, TdsDecimal y) { return (x / y); }
public static TdsDecimal ConvertToPrecScale (TdsDecimal n, int precision, int scale) { throw new NotImplementedException (); }
public static TdsDecimal Ceiling (TdsDecimal n) { throw new NotImplementedException(); }
public static TdsDecimal Truncate (TdsDecimal n, int position) { throw new NotImplementedException (); }
public static TdsBoolean LessThan (TdsDecimal x, TdsDecimal y) { return (x < y); }
public static TdsDecimal operator - (TdsDecimal x, TdsDecimal y) { if (x.IsPositive && !y.IsPositive) return x + y; if (!x.IsPositive && y.IsPositive) return -(x + y); if (!x.IsPositive && !y.IsPositive) return y - x; // otherwise, x is positive and y is positive bool resultPositive = (bool)(x > y); int[] yData = y.Data; for (int i = 0; i < 4; i += 1) yData[i] = -yData[i]; TdsDecimal yInverse = new TdsDecimal (y.Precision, y.Scale, y.IsPositive, yData); if (resultPositive) return x + yInverse; else return -(x + yInverse); }
public static TdsDecimal Add (TdsDecimal x, TdsDecimal y) { return (x + y); }