From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-03-11 13:15:34
At 07:47 PM 3/10/2002, Chuck Allison wrote:
>Please pardon my naievete, but isn't the underlying numeric type to
>a template parameter (I don't have the class handy)? Isn't it equipped
>therefore to use an instantiation based on unlimited precision integers?
>not, could you please explain why not. (I assume that an unlimited
>precision integer package would overload the pertinent operators).
Let me try to answer this to make sure I understand Paul's position (so I
can repeat it to the LWG).
Yes, rational is parameterized on the integer type, and so can be used with
any build-in integer or user-supplied class which meets the requirements.
However, because of subtle rounding, precision, and other issues not
well-known to most programmers, not all integer types are really suitable
for most applications. In fact, the most suitable integer type would often
be a unlimited-precision integer, yet neither Boost nor the standard
currently have such a type.
Thus even though rational is itself ready for standardization, some people
might feel it would be more appropriate to wait until there is also an
unlimited-precision integer class available for standardization.
Paul, please correct me if I've got this wrong:-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk