Fraction Library
A C++ Fraction library.

This file implementes the interface of the Fraction class. More...
#include "Fraction.h"
#include <cmath>
#include <string>
Go to the source code of this file.
Defines  
#define  ACCLIMIT 100000000 
Determines the accuracy when converting a decimal number into a fraction.  
Functions  
bool  operator== (const Fraction &left, const Fraction &right) 
bool  operator!= (const Fraction &left, const Fraction &right) 
bool  operator< (const Fraction &left, const Fraction &right) 
bool  operator<= (const Fraction &left, const Fraction &right) 
bool  operator> (const Fraction &left, const Fraction &right) 
bool  operator>= (const Fraction &left, const Fraction &right) 
Fraction  operator+ (const Fraction &left, const Fraction &right) 
Fraction  operator (const Fraction &left, const Fraction &right) 
Fraction  operator* (const Fraction &left, const Fraction &right) 
Fraction  operator/ (const Fraction &left, const Fraction &right) 
ostream &  operator<< (ostream &out, const Fraction &fraction) 
istream &  operator>> (istream &in, Fraction &fraction) 
This file implementes the interface of the Fraction class.
Private and protected members of the class are also implemented in this file.
Definition in file Fraction.cpp.
#define ACCLIMIT 100000000 
Determines the accuracy when converting a decimal number into a fraction.
Currently, conversion is accurate to 34 decimal places.
Increase number to increase accuracy. However, if it becomes too large, conversion operation will fail due to how numbers are represented in memory in c++.
Definition at line 22 of file Fraction.cpp.
left  Fraction object to the left of the operator. 
right  Fraction object to the right of the operator. 
Definition at line 328 of file Fraction.cpp.
left  Fraction on the left of the operator 
right  Fraction on the right of the operator 
Definition at line 370 of file Fraction.cpp.
left  Fraction on the left of the operator 
right  Fraction on the right of the operator 
Definition at line 358 of file Fraction.cpp.
left  Fraction on the left of the operator 
right  Fraction on the right of the operator 
Definition at line 364 of file Fraction.cpp.
left  Fraction on the left of the operator 
right  Fraction on the right of the operator 
Definition at line 376 of file Fraction.cpp.
left  Fraction object to the left of the operator. 
right  Fraction object to the right of the operator. 
Definition at line 334 of file Fraction.cpp.
ostream& operator<<  (  ostream &  out, 
const Fraction &  fraction  
) 
out  output stream (operation assumes stream is already setup (ie. connected to file, screen etc.) 
fraction  Fraction object to output. 
Definition at line 384 of file Fraction.cpp.
left  Fraction object to the left of the operator. 
right  Fraction object to the right of the operator. 
Definition at line 340 of file Fraction.cpp.
left  Fraction object to the left of the operator. 
right  Fraction object to the right of the operator. 
Definition at line 322 of file Fraction.cpp.
left  Fraction object to the left of the operator. 
right  Fraction object to the right of the operator. 
Definition at line 346 of file Fraction.cpp.
left  Fraction object to the left of the operator. 
right  Fraction object to the right of the operator. 
Definition at line 352 of file Fraction.cpp.
istream& operator>>  (  istream &  in, 
Fraction &  fraction  
) 
in  input stream (operation assumes stream is already setup (ie. connected to file, screen etc.) 
fraction  The input from stream is assigned to this fraction object. 
Definition at line 399 of file Fraction.cpp.