Exemple #1
0
 public static BigDouble Subtract(BigDouble left, BigDouble right)
 {
     return(left - right);
 }
Exemple #2
0
 public int CompareTo(BigDouble value)
 {
     return(Compare(this, value));
 }
Exemple #3
0
 public static BigDouble Add(BigDouble left, BigDouble right)
 {
     return(left + right);
 }
Exemple #4
0
        public static int Compare(BigDouble left, object right)
        {
            if (right is BigDouble)
            {
                return(Compare(left, (BigDouble)right));
            }

            if (right is bool)
            {
                return(Compare(left, new BigDouble((bool)right)));
            }

            if (right is byte)
            {
                return(Compare(left, new BigDouble((byte)right)));
            }

            if (right is char)
            {
                return(Compare(left, new BigDouble((char)right)));
            }

            if (right is decimal)
            {
                return(Compare(left, new BigDouble((decimal)right)));
            }

            if (right is double)
            {
                return(Compare(left, new BigDouble((double)right)));
            }

            if (right is short)
            {
                return(Compare(left, new BigDouble((short)right)));
            }

            if (right is int)
            {
                return(Compare(left, new BigDouble((int)right)));
            }

            if (right is long)
            {
                return(Compare(left, new BigDouble((long)right)));
            }

            if (right is sbyte)
            {
                return(Compare(left, new BigDouble((sbyte)right)));
            }

            if (right is float)
            {
                return(Compare(left, new BigDouble((float)right)));
            }

            if (right is ushort)
            {
                return(Compare(left, new BigDouble((ushort)right)));
            }

            if (right is uint)
            {
                return(Compare(left, new BigDouble((uint)right)));
            }

            if (right is ulong)
            {
                return(Compare(left, new BigDouble((ulong)right)));
            }

            throw new ArgumentException();
        }