source file of the Flower Library
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include <math.h>
#include <stdlib.h>
ostream &
operator << (ostream &o, Rational r)
{
- o << r.str ();
+ o << r.string ();
return o;
}
#endif
return b;
}
+#if 0
static
int lcm (int a, int b)
{
return abs (a*b / gcd (a,b));
}
+#endif
void
Rational::set_infinite (int s)
}
String
-Rational::str () const
+Rational::to_string () const
{
if (infty_b ())
{
String s (sign_ > 0 ? "" : "-" );
return String (s + "infinity");
}
- String s = to_str (num ());
+
+ String s = ::to_string (num ());
if (den () != 1 && num ())
- s += "/" + to_str (den ());
+ s += "/" + ::to_string (den ());
return s;
}