From: Andras Erdei (aerdei_at_[hidden])
Date: 2004-12-12 15:08:02
On Sun, 12 Dec 2004 12:35:29 -0700, "Jonathan Turkanis" <technews_at_[hidden]> wrote:
>This is essentially what the docs currently state: "The rational number class is
>designed for use in conjunction with an unlimited precision integer class." It
>would be easy to prevent rational from being instantiated with built-in integral
>types, but this would just make the library less useful. Perhaps the disclaimer
>should be featured more prominently.
[disclaimer: i'm not native english]
rational.html in boost 1.30.2 says:
"Any of the built-in integer types provided by the C++ implementation are supported
as values for I. User-defined types may also be used, but..."
this gives the impression of non-builtins being the exception
"It is therefore likely that the rational number class will in many cases be used with
limited-precision integer types, such as the built-in int type."
this one, too
"When used with a limited precision integer type, the rational class suffers from many
of the precision issues which cause difficulty with floating point types. While it is
likely that precision issues will not affect simple uses of the rational class, users
should be aware that such issues exist."
imho with a built-in type rational<> has more issues than float,
and not just precision, but also garbage instead of rounding, and
it is likely to affect even simple uses
>It sounds like you are describing a numeric type which could coexist with
>boost::rational. Perhaps you should implement it and post it.
it does not necessarily have to be separate from rational<>
if there is interest in using it, but no one is interested
in implementing it, and it is not a problem that it will
take months for me (end of semester, exams time) then yes,
i can do it
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk