Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-03-11 11:22:46


At 05:43 PM 3/10/2002, Paul Moore wrote:

>On Sun, 10 Mar 2002 17:31:03 -0500, Beman Dawes <bdawes_at_[hidden]> wrote:
>
>>At 05:27 AM 3/8/2002, Moore, Paul wrote:
>> >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.
>
>I'm not entirely convinced of the need to go that far. It's certainly
>worth pointing out to the committee that rationals based on
>limited-precision integers, although they are an "obvious" thing to many
>users, suffer from subtle precision and rounding issues (assuming they
>hadn't already noted the point).
>
>If the committee feels that this makes rationals not ready for
>standardisation in the absence of an unlimited-precision integer class,
>I am happy with that. If they feel that there is still some value in
>providing a canonical definition of rationals in any case, I'm happy to
>go with that as well.
>
>[In other words, as long as the committee is made aware of the issue,
>that's enough for me - I don't have the experience to judge what way the
>decision should go].

OK. I'll pass that on to the committee, and let you know their response.

In the meantime, this is further encouragement for someone to step forward
with an unlimited-precision integer class.

By the way, I've heard of an application for rational numbers that is new
to me. In at least some US states (this sort of law varies from state to
state), property ownership is recorded in fractions, and it isn't legal to
carry the value any other way. For example, someone might own "an
undivided 27/75th interest" in some land. It is OK to convert that to
9/25th, but not to 0.36. Then if a half-interest is sold, the new owners
each own 9/50ths.

--Beman


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