本文整理汇总了C#中HugeInt.IsCongruentTo方法的典型用法代码示例。如果您正苦于以下问题:C# HugeInt.IsCongruentTo方法的具体用法?C# HugeInt.IsCongruentTo怎么用?C# HugeInt.IsCongruentTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HugeInt
的用法示例。
在下文中一共展示了HugeInt.IsCongruentTo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IntIsCongruentToLimb
public void IntIsCongruentToLimb()
{
using (var a = new HugeInt("234052834524092854092874502983745029345723098457209305983434345"))
{
var b = Platform.Ui(5931690917503076532, 533076532);
var c = Platform.Ui(98764938475983745, 97983745);
a.Value = (a * b) + c;
Assert.IsTrue(a.IsCongruentTo(c, b));
a.Value = a + 1;
Assert.IsFalse(a.IsCongruentTo(c, b));
}
}
示例2: IntIsCongruentToHugeInt
public void IntIsCongruentToHugeInt()
{
using (var a = new HugeInt("234052834524092854092874502983745029345723098457209305983434345"))
using (var b = new HugeInt("394580293847502987609283945873594873409587"))
using (var c = new HugeInt("293847502987609283945873594873409587"))
{
a.Value = (a * b) + c;
Assert.IsTrue(a.IsCongruentTo(c, b));
a.Value = a + 1;
Assert.IsFalse(a.IsCongruentTo(c, b));
}
}