Lines Matching defs:BigUnsigned

7 #include "BigUnsigned.hh"
12 // BigUnsigned.hh.
14 BigUnsigned::BigUnsigned(unsigned long x) { initFromPrimitive (x); }
15 BigUnsigned::BigUnsigned(unsigned int x) { initFromPrimitive (x); }
16 BigUnsigned::BigUnsigned(unsigned short x) { initFromPrimitive (x); }
17 BigUnsigned::BigUnsigned( long x) { initFromSignedPrimitive(x); }
18 BigUnsigned::BigUnsigned( int x) { initFromSignedPrimitive(x); }
19 BigUnsigned::BigUnsigned( short x) { initFromSignedPrimitive(x); }
21 unsigned long BigUnsigned::toUnsignedLong () const { return convertToPrimitive <unsigned long >(); }
22 unsigned int BigUnsigned::toUnsignedInt () const { return convertToPrimitive <unsigned int >(); }
23 unsigned short BigUnsigned::toUnsignedShort() const { return convertToPrimitive <unsigned short>(); }
24 long BigUnsigned::toLong () const { return convertToSignedPrimitive< long >(); }
25 int BigUnsigned::toInt () const { return convertToSignedPrimitive< int >(); }
26 short BigUnsigned::toShort () const { return convertToSignedPrimitive< short>(); }
30 void BigUnsigned::setBlock(Index i, Blk newBlock) {
50 /* Evidently the compiler wants BigUnsigned:: on the return type because, at
51 * that point, it hasn't yet parsed the BigUnsigned:: on the name to get the
53 BigUnsigned::Index BigUnsigned::bitLength() const {
67 void BigUnsigned::setBit(Index bi, bool newBit) {
75 BigUnsigned::CmpRes BigUnsigned::compareTo(const BigUnsigned &x) const {
105 * In this case, we first compute the result into a temporary BigUnsigned
111 * BigUnsigned.hh). Before then, put-here operations rejected aliased calls
122 BigUnsigned tmpThis; \
130 void BigUnsigned::add(const BigUnsigned &a, const BigUnsigned &b) {
146 const BigUnsigned *a2, *b2;
154 // Set prelimiary length and make room in this BigUnsigned
162 // This test is used many times in the BigUnsigned code.
190 void BigUnsigned::subtract(const BigUnsigned &a, const BigUnsigned &b) {
298 inline BigUnsigned::Blk getShiftedBlock(const BigUnsigned &num,
299 BigUnsigned::Index x, unsigned int y) {
300 BigUnsigned::Blk part1 = (x == 0 || y == 0) ? 0 : (num.blk[x - 1] >> (BigUnsigned::N - y));
301 BigUnsigned::Blk part2 = (x == num.len) ? 0 : (num.blk[x] << y);
305 void BigUnsigned::multiply(const BigUnsigned &a, const BigUnsigned &b) {
387 void BigUnsigned::divideWithRemainder(const BigUnsigned &b, BigUnsigned &q) {
398 BigUnsigned tmpB(b);
549 void BigUnsigned::bitAnd(const BigUnsigned &a, const BigUnsigned &b) {
560 void BigUnsigned::bitOr(const BigUnsigned &a, const BigUnsigned &b) {
563 const BigUnsigned *a2, *b2;
580 void BigUnsigned::bitXor(const BigUnsigned &a, const BigUnsigned &b) {
583 const BigUnsigned *a2, *b2;
600 void BigUnsigned::bitShiftLeft(const BigUnsigned &a, int b) {
625 void BigUnsigned::bitShiftRight(const BigUnsigned &a, int b) {
662 void BigUnsigned::operator ++() {
678 void BigUnsigned::operator ++(int) {
683 void BigUnsigned::operator --() {
698 void BigUnsigned::operator --(int) {