public static Int64Value Rem_Un(Int64Value a, Int64Value b)
 {
     if (a.allBitsValid() && b.allBitsValid())
     {
         try {
             return(new Int64Value((long)((ulong)a.value % (ulong)b.value)));
         }
         catch (ArithmeticException) {
             return(createUnknown());
         }
     }
     if ((ReferenceEquals(a, b) && a.isNonZero()) || b.hasValue(1))
     {
         return(zero);
     }
     return(createUnknown());
 }
 public static Int64Value Div(Int64Value a, Int64Value b)
 {
     if (a.allBitsValid() && b.allBitsValid())
     {
         try {
             return(new Int64Value(a.value / b.value));
         }
         catch (ArithmeticException) {
             return(createUnknown());
         }
     }
     if (ReferenceEquals(a, b) && a.isNonZero())
     {
         return(one);
     }
     if (b.hasValue(1))
     {
         return(a);
     }
     return(createUnknown());
 }
Beispiel #3
0
 public static Int64Value Rem_Un(Int64Value a, Int64Value b)
 {
     if (a.allBitsValid() && b.allBitsValid()) {
         try {
             return new Int64Value((long)((ulong)a.value % (ulong)b.value));
         }
         catch (ArithmeticException) {
             return createUnknown();
         }
     }
     if ((ReferenceEquals(a, b) && a.isNonZero()) || b.hasValue(1))
         return new Int64Value(0);
     return createUnknown();
 }
Beispiel #4
0
 public static Int64Value Div(Int64Value a, Int64Value b)
 {
     if (a.allBitsValid() && b.allBitsValid()) {
         try {
             return new Int64Value(a.value / b.value);
         }
         catch (ArithmeticException) {
             return createUnknown();
         }
     }
     if (ReferenceEquals(a, b) && a.isNonZero())
         return new Int64Value(1);
     if (b.hasValue(1))
         return a;
     return createUnknown();
 }