Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-03-10 17:31:03


At 05:27 AM 3/8/2002, Moore, Paul wrote:

>> I'd say the discussion tended toward a 'yes' answer, but
>> some people weren't sure; they thought rational numbers
>> might be close to the boundary between 'yes' and 'no', and
>> wanted to see a few more clearcut cases before making a
>> decision.
>
>Makes sense. My point of view is that of an (ex-) mathematician, looking
at
>the library from a completeness point of view. In that context, having
>complex numbers, but not rationals, seems odd. And from a
non-mathematical
>practical computing position, I have never needed complex numbers, but
have
>occasionally wanted rationals. (Although, in practice, I have always been
>able to work around not having rationals, so I can't say I've ever had a
>serious problem with the lack...)
>
>My experience from the actual implementation process is that, without an
>unlimited-precision integer type on which to base the rational class, the
>usefulness of rational<> is drastically diminished. Both double and
>rational<int> have subtle rounding, precision, and other issues. With
>double, these properties are fairly well-known, especially by the sort of
>people who are likely to hit them. With rational<int>, they are *not*
well
>known. On the contrary, the sort of people who might use rational<int>
are
>very likely to completely miss the fact that there are such problems. (I
>nearly did, until I started doing the actual implementation!)
>
>It's arguable that these sort of issues make rational<> inappropriate for
>the standard library. And it's *definitely* arguable that
>unlimited-precision integers are more appropriate, and should be
considered
>first. (One slight issue - there's no candidate implementation of
>unlimited-precision integers, yet!)

That sounds reasonable. If you would like, I'll ask the committee to table
rational pending unlimited-precision integers.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk