protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUInt32().Value; var v = p2.ToUBigInt().Value; var w = u.DivideExactly(v); return(new UInt32DataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToBigInt().Value; var v = p2.ToUBigInt().Value; var w = BigInt.Compare(u, v); return(new Int32DataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUBigInt().Value; var v = p2.ToRational().Value; var w = Rational.Equals(u, v) ? 1U : 0U; return(new UInt32DataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUBigInt().Value; var v = p2.ToRational().Value; var w = u.CompareTo(v); return(new Int32DataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToInt64().Value; var v = p2.ToUBigInt().Value; var w = u.Equals(v); return(new UInt32DataItem(w ? 1U : 0U)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUBigInt().Value; var v = p2.ToUInt64().Value; var w = u.Remainder(v); return(new UInt64DataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUBigInt().Value; var v = p2.ToInt32().Value; var w = Rational.Pow(u, v); return(new RationalDataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUInt64().Value; var v = p2.ToUBigInt().Value; var w = u.GreatestCommonDivisor(v); return(new UBigIntDataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToRational().Value; var v = p2.ToUBigInt().Value; var w = u / v; return(new RationalDataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUBigInt().Value; var v = p2.ToUBigInt().Value; var w = u.Mod(v); return(new UBigIntDataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToInt64().Value; var v = p2.ToUBigInt().Value; var w = u.ExclusiveOr(v); return(new BigIntDataItem(w)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2, IDataItem p3) { var n = p1.ToUBigInt().Value; var f = p2.ToXString().Value; var c = p3.ToNumberFormatInfo().Value; var r = n.ToString(f, c); return(new XStringDataItem(r)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2, IDataItem p3) { var v = p1.ToUBigInt().Value; var e = p2.ToUBigInt().Value; var m = p3.ToUBigInt().Value; var r = v.ModPow(e, m); return(new UBigIntDataItem(r)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2, out IDataItem r2) { var u = p1.ToUBigInt().Value; var v = p2.ToUInt64().Value; UInt64 r; var q = UBigInt.DivRem(u, v, out r); r2 = new UInt64DataItem(r); return(new UBigIntDataItem(q)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2, out IDataItem r2) { var u = p1.ToUBigInt().Value; var v = p2.ToInt32().Value; UInt32 r; var q = u.DivRem(v, out r); r2 = new UInt32DataItem(r); return(new BigIntDataItem(q)); }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUInt32().Value; var v = p2.ToUBigInt().Value; try { var w = u.CompareTo(v); return(new Int32DataItem(w)); } catchx(Exception ex) { return(new ExceptionDataItem(ex.GetType())); } }
protected override IDataItem TestFunc(IDataItem p1, IDataItem p2) { var u = p1.ToUInt64().Value; var v = p2.ToUBigInt().Value; try { var w = u.Equals(v); return(new UInt32DataItem(w ? 1U : 0U)); } catchx(Exception ex) { return(new ExceptionDataItem(ex.GetType())); } }