|
Boost : |
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-04-07 15:49:17
Sylvain Pion wrote:
> I don't know if it qualifies as real-world, but CGAL (www.cgal.org)
> provides a Quotient<> class and uses it heavily.
> It is basically the same thing as boost::rational, although I have
> not checked the differences in detail, nor tried it.
> It is used together with big ints or big floats, mostly.
Since I haven't got many responses from people using boost::rational with finite
precision types, maybe Quotient<> can help shed light on the question whether
rational<int> is useless without rounding: do you know whether Quotient<> is
ever used with finite precision types, and if so, what is its behavior when the
result of an operation cannot be expressed exactly?
> As far as standardization is concerned, I think a big int
> class should go together with a big rational class
> (which can benefit from being template).
Don't you get a "big rational" class for free, as rational<bigint>?
Jonathan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk