Пример #1
0
		public static TdsInt32 Sign (TdsDecimal n)
		{
			throw new NotImplementedException ();
		}
Пример #2
0
		public static TdsDecimal Subtract (TdsDecimal x, TdsDecimal y)
		{
			return (x - y);
		}
Пример #3
0
		public static TdsBoolean NotEquals (TdsDecimal x, TdsDecimal y)
		{
			return (x != y);
		}
Пример #4
0
		public static TdsDecimal Power (TdsDecimal n, double exp)
		{
			throw new NotImplementedException ();
		}
Пример #5
0
		public static TdsBoolean LessThanOrEqual (TdsDecimal x, TdsDecimal y)
		{
			return (x <= y);
		}
Пример #6
0
		public static TdsDecimal Multiply (TdsDecimal x, TdsDecimal y)
		{
			return (x * y);
		}
Пример #7
0
		public static TdsBoolean GreaterThanOrEqual (TdsDecimal x, TdsDecimal y)
		{
			return (x >= y);
		}
Пример #8
0
		public static TdsDecimal AdjustScale (TdsDecimal n, int digits, bool fRound)
		{
			throw new NotImplementedException ();
		}
Пример #9
0
		public static TdsDecimal Floor (TdsDecimal n)
		{
			throw new NotImplementedException ();
		}
Пример #10
0
		public static TdsBoolean GreaterThan (TdsDecimal x, TdsDecimal y)
		{
			return (x > y);
		}
Пример #11
0
		public static TdsDecimal Divide (TdsDecimal x, TdsDecimal y)
		{
			return (x / y);
		}
Пример #12
0
		public static TdsDecimal ConvertToPrecScale (TdsDecimal n, int precision, int scale)
		{
			throw new NotImplementedException ();
		}
Пример #13
0
		public static TdsDecimal Ceiling (TdsDecimal n)
		{
			throw new NotImplementedException();
		}
Пример #14
0
		public static TdsDecimal Truncate (TdsDecimal n, int position)
		{
			throw new NotImplementedException ();
		}
Пример #15
0
		public static TdsBoolean LessThan (TdsDecimal x, TdsDecimal y)
		{
			return (x < y);
		}
Пример #16
0
		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);
		}
Пример #17
0
		public static TdsDecimal Add (TdsDecimal x, TdsDecimal y)
		{
			return (x + y);
		}