|
Boost : |
From: Moore, Paul (paul.moore_at_[hidden])
Date: 2001-01-16 04:48:05
From: Stephen Silver [mailto:boost_at_[hidden]]
> 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:
>
> http://www.argentum.freeserve.co.uk/cpp/rational.zip
>
> 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++).
Thanks, I'll look at this soon.
Paul.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk