Lines Matching refs:mag
16 mag = x.mag; in operator =()
20 BigInteger::BigInteger(const Blk *b, Index blen, Sign s) : mag(b, blen) { in BigInteger()
23 if (!mag.isZero()) in BigInteger()
30 sign = mag.isZero() ? zero : s; in BigInteger()
39 BigInteger::BigInteger(const BigUnsigned &x, Sign s) : mag(x) { in BigInteger()
42 if (!mag.isZero()) in BigInteger()
49 sign = mag.isZero() ? zero : s; in BigInteger()
63 BigInteger::BigInteger(unsigned long x) : mag(x) { sign = mag.isZero() ? zero : positive; } in BigInteger()
64 BigInteger::BigInteger(unsigned int x) : mag(x) { sign = mag.isZero() ? zero : positive; } in BigInteger()
65 BigInteger::BigInteger(unsigned short x) : mag(x) { sign = mag.isZero() ? zero : positive; } in BigInteger()
84 BigInteger::BigInteger(long x) : sign(signOf(x)), mag(magOf<long , unsigned long >(x)) {} in BigInteger()
85 BigInteger::BigInteger(int x) : sign(signOf(x)), mag(magOf<int , unsigned int >(x)) {} in BigInteger()
86 BigInteger::BigInteger(short x) : sign(signOf(x)), mag(magOf<short, unsigned short>(x)) {} in BigInteger()
104 return convertBigUnsignedToPrimitiveAccess<X>(mag); in convertToUnsignedPrimitive()
113 else if (mag.getLength() == 1) { in convertToSignedPrimitive()
115 Blk b = mag.getBlock(0); in convertToSignedPrimitive()
152 return mag.compareTo(x.mag); in compareTo()
155 return CmpRes(-mag.compareTo(x.mag)); in compareTo()
185 mag.add(a.mag, b.mag); in add()
188 switch (a.mag.compareTo(b.mag)) { in add()
191 mag = 0; in add()
198 mag.subtract(a.mag, b.mag); in add()
202 mag.subtract(b.mag, a.mag); in add()
214 mag = b.mag; in subtract()
223 mag.add(a.mag, b.mag); in subtract()
226 switch (a.mag.compareTo(b.mag)) { in subtract()
229 mag = 0; in subtract()
236 mag.subtract(a.mag, b.mag); in subtract()
242 mag.subtract(b.mag, a.mag); in subtract()
253 mag = 0; in multiply()
260 mag.multiply(a.mag, b.mag); in multiply()
298 q.mag = 0; in divideWithRemainder()
304 q.mag = 0; in divideWithRemainder()
319 mag--; in divideWithRemainder()
343 mag.divideWithRemainder(b.mag, q.mag); in divideWithRemainder()
348 q.mag++; in divideWithRemainder()
350 mag.subtract(b.mag, mag); in divideWithRemainder()
351 mag--; in divideWithRemainder()
358 if (mag.isZero()) in divideWithRemainder()
360 if (q.mag.isZero()) in divideWithRemainder()
370 mag = a.mag; in negate()
380 mag--; in operator ++()
381 if (mag == 0) in operator ++()
384 mag++; in operator ++()
400 mag--; in operator --()
401 if (mag == 0) in operator --()
404 mag++; in operator --()