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()); }
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(); }