From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-12-12 13:24:40
Mickey Moore wrote:
> If someone wants the best approximation rather than the exact answer,
> they would probably just be using floating point. rational is used
> when people want an exact answer, not just an approximation.
> I think it would be more useful to add a mechanism (probably
> optional) for reporting when such overflows ocurred (or some
> equivalent to floating point NANs and INFs, perhaps).
I'm now the maintainer of Boost.Rational, although I haven't made any changes
yet (the only change I've been planning to make is to make int_type public).
It might be useful to introduce a checked_rational template, interconvertible
with rational, which throws upon overflow. When I get a little less far behind
with my current projects, I'm planning to post here asking for feature requests.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk