rational-native.cpp File Reference
Implementation of class Rational using native (bounded precision) computer arithmetic. More...
Go to the source code of this file.
Namespaces
Classes
Functions
- static long int CVCL::plus (long int x, long int y)
- Add two integers and check for overflows.
- static long int CVCL::uminus (long int x)
- Unary minus which checks for overflows.
- static long int CVCL::mult (long int x, long int y)
- Multiply two integers and check for overflows.
- static long int CVCL::gcd (long int n1, long int n2)
- Compute GCD using Euclid's algorithm (from Aaron Stump's code).
- static long int CVCL::lcm (long int n1, long int n2)
- Compute LCM.
- ostream & CVCL::operator<< (ostream &os, const Rational &n)
- static void CVCL::checkInt (const Rational &n, const string &funName)
- Rational CVCL::gcd (const Rational &x, const Rational &y)
- Rational CVCL::gcd (const vector< Rational > &v)
- Rational CVCL::lcm (const Rational &x, const Rational &y)
- Rational CVCL::lcm (const vector< Rational > &v)
- Rational CVCL::abs (const Rational &x)
- Rational CVCL::floor (const Rational &x)
- Rational CVCL::ceil (const Rational &x)
- Rational CVCL::mod (const Rational &x, const Rational &y)
- bool CVCL::operator== (const Rational &n1, const Rational &n2)
- bool CVCL::operator< (const Rational &n1, const Rational &n2)
- bool CVCL::operator<= (const Rational &n1, const Rational &n2)
- bool CVCL::operator> (const Rational &n1, const Rational &n2)
- bool CVCL::operator>= (const Rational &n1, const Rational &n2)
- bool CVCL::operator!= (const Rational &n1, const Rational &n2)
- Rational CVCL::operator+ (const Rational &n1, const Rational &n2)
- Rational CVCL::operator- (const Rational &n1, const Rational &n2)
- Rational CVCL::operator * (const Rational &n1, const Rational &n2)
- Rational CVCL::operator/ (const Rational &n1, const Rational &n2)
- Rational CVCL::operator% (const Rational &n1, const Rational &n2)
Detailed Description
Implementation of class Rational using native (bounded precision) computer arithmetic.
Author: Sergey Berezin
Created: Mon Jul 28 12:18:03 2003
Copyright (C) 2003 by the Board of Trustees of Leland Stanford Junior University and by New York University.
License to use, copy, modify, sell and/or distribute this software and its documentation for any purpose is hereby granted without royalty, subject to the terms and conditions defined in the LICENSE file provided with this distribution. In particular:
- The above copyright notice and this permission notice must appear in all copies of the software and related documentation.
- THE SOFTWARE IS PROVIDED "AS-IS", WITHOUT ANY WARRANTIES, EXPRESSED OR IMPLIED. USE IT AT YOUR OWN RISK.
Definition in file rational-native.cpp.
Generated on Thu Apr 13 16:57:37 2006 for CVC Lite by
1.4.4