Ejemplo n.º 1
0
 /// <summary>
 /// Signed addition built upon unsigned add and subtract.
 /// </summary>
 internal virtual void SignedAdd(MutableBigInteger addend)
 {
     if (Sign == 1)
     {
         Add(addend);
     }
     else
     {
         Sign = Sign * Subtract(addend);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Signed subtraction built upon unsigned add and subtract.
 /// </summary>
 internal virtual void SignedSubtract(MutableBigInteger addend)
 {
     if (Sign == 1)
     {
         Sign = Sign * Subtract(addend);
     }
     else
     {
         Add(addend);
     }
     if (IntLen == 0)
     {
         Sign = 1;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Construct a new MutableBigInteger with a magnitude equal to the
 /// specified MutableBigInteger.
 /// </summary>
 internal SignedMutableBigInteger(MutableBigInteger val) : base(val)
 {
 }