source file of the Flower Library
- (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#ifndef RATIONAL_HH
#define RATIONAL_HH
-#include "compare.hh"
-#include "arithmetic-operator.hh"
-#include "flower-proto.hh"
#include "string.hh"
-
/**
Rational numbers. Included is support for + and - infinity.
*/
void set_infinite (int sign);
bool is_infinity () const;
void invert ();
- int num () const { return sign_ * num_; }
- int den () const { return den_; }
+ int numerator () const { return sign_ * num_; }
+ int denominator () const { return den_; }
+ int num () const { return numerator(); }
+ int den () const { return denominator(); }
Rational trunc_rat () const;
Rational div_rat (Rational) const;