bigint - bool operator<= (const bigint &that) const;...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef __BIGINT_H__ #define __BIGINT_H__ # #include <exception> #include <iostream> #include <utility> # using namespace std; u #include "trace.h" # class bigint; typedef pair <bigint, bigint> bigpair; t class bigint { friend ostream &operator public: // // Override implicit members. // bigint (); bigint (const bigint &that); bigint &operator= (const bigint &that); ~bigint (); // // Extra ctors to make bigints. // bigint (const int that); bigint (const string &that); // // Basic add/sub operators. // bigint operator+ (const bigint &that) const; bigint operator- (const bigint &that) const; int smallint () const; // // Extended operators implemented with add/sub. // bigint operator* (const bigint &that) const; bigint operator/ (const bigint &that) const; bigint operator% (const bigint &that) const; bigint pow (const bigint &that) const; bigint sqrt () const; // // Comparison operators. // bool operator== (const bigint &that) const; bool operator!= (const bigint &that) const; bool operator< (const bigint &that) const;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bool operator<= (const bigint &that) const; bool operator> (const bigint &that) const; bool operator>= (const bigint &that) const; private: int small_value; bigpair div_rem (const bigint &that) const; int compare (const bigint &that) const; bigint mul_by_2 (); }; } // // Operators with a left side of int. // bigint operator+ (int left, const bigint &that); bigint operator- (int left, const bigint &that); bigint operator* (int left, const bigint &that); bigint operator/ (int left, const bigint &that); bigint operator% (int left, const bigint &that); bool operator== (int left, const bigint &that); bool operator!= (int left, const bigint &that); bool operator< (int left, const bigint &that); bool operator<= (int left, const bigint &that); bool operator> (int left, const bigint &that); bool operator>= (int left, const bigint &that); b RCSH(__bigint_h__, "$Id: bigint.h,v 1.2 2010-01-22 17:33:07-08 - - $") " #endif...
View Full Document

This note was uploaded on 01/26/2010 for the course CMPS 109 taught by Professor Bailey,d during the Spring '08 term at UCSC.

Page1 / 2

bigint - bool operator<= (const bigint &that) const;...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online