| 15 | #include <gmp.h> |
| 16 | |
| 17 | class BigInt |
| 18 | { |
| 19 | mpz_t value; |
| 20 | |
| 21 | public: |
| 22 | |
| 23 | BigInt( ); |
| 24 | BigInt( int ); |
| 25 | BigInt( const BigInt& ); |
| 26 | ~BigInt( ); |
| 27 | |
| 28 | BigInt& operator = ( int ); |
| 29 | BigInt& operator = ( const BigInt& ); |
| 30 | |
| 31 | operator bool( ); |
| 32 | operator int( ); |
| 33 | operator short( ); |
| 34 | |
| 35 | BigInt operator - ( ); |
| 36 | BigInt& operator += ( const BigInt& ); |
| 37 | BigInt& operator -= ( const BigInt& ); |
| 38 | BigInt& operator *= ( const BigInt& ); |
| 39 | BigInt& operator /= ( const BigInt& ); |
| 40 | BigInt& operator ++ ( ); |
| 41 | BigInt operator ++ ( int ); |
| 42 | BigInt& operator -- ( ); |
| 43 | BigInt operator -- ( int ); |
| 44 | |
| 45 | friend BigInt operator - ( const BigInt& ); |
| 46 | |
| 47 | friend bool operator < ( const BigInt&, const BigInt& ); |
| 48 | friend bool operator <= ( const BigInt&, const BigInt& ); |
| 49 | friend bool operator > ( const BigInt&, const BigInt& ); |
| 50 | friend bool operator >= ( const BigInt&, const BigInt& ); |
| 51 | friend bool operator == ( const BigInt&, const BigInt& ); |
| 52 | friend bool operator != ( const BigInt&, const BigInt& ); |
| 53 | friend bool operator < ( const int&, const BigInt& ); |
| 54 | friend bool operator <= ( const int&, const BigInt& ); |
| 55 | friend bool operator > ( const int&, const BigInt& ); |
| 56 | friend bool operator >= ( const int&, const BigInt& ); |
| 57 | friend bool operator == ( const int&, const BigInt& ); |
| 58 | friend bool operator != ( const int&, const BigInt& ); |
| 59 | friend bool operator < ( const BigInt&, const int& ); |
| 60 | friend bool operator <= ( const BigInt&, const int& ); |
| 61 | friend bool operator > ( const BigInt&, const int& ); |
| 62 | friend bool operator >= ( const BigInt&, const int& ); |
| 63 | friend bool operator == ( const BigInt&, const int& ); |
| 64 | friend bool operator != ( const BigInt&, const int& ); |
| 65 | |
| 66 | friend int sgn ( const BigInt& ); |
| 67 | friend BigInt abs ( const BigInt& ); |
| 68 | }; |
| 69 | |
| 70 | BigInt operator + ( const BigInt&, const BigInt& ); |
| 71 | BigInt operator - ( const BigInt&, const BigInt& ); |
no outgoing calls
no test coverage detected