From: Stephen Silver (boost_at_[hidden])
Date: 2001-01-15 16:43:13
I've written a program that runs a hundred or so simple tests on
boost::rational. In addition to the operator< bugs that I posted
yesterday, this test program found problems with lcm() (sometimes
returns negative numbers, and lcm(0,0) causes division by zero),
and with operator>> (input errors not always handled correctly).
I've uploaded the test program to:
This zip file also contains a modified version of rational.hpp
that passes all the tests (for the short, int, long and Integer
specializations, where Integer is an arbitrary-precision type based
on GMP mpz_t). This modified version compiles with both GCC 2.95.2
and Borland C++ 5.5.1 (but almost certainly won't compile with MSVC++).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk