It would also fall apart in an exotic implementation that
had larger infinities (e.g., some variation on Conway's
construction of numbers).
As always, there are two separate questions: (1) can a sensible
implementation work the way John suggests (and what would
that be like); (2) should the standard *require* implementations
to work that way.
The answer to (2) is almost never "yes" and the question of
(1) is almost always the more interesting one (these days...
30 years ago it appears to have been a different story).
Making this a very peculiar sort of list....
-t
Peter Gavin wrote:
> On 12/13/06, John Cowan <cowan_at_ccil.org> wrote:
>> In R5RS the max and min functions must take at least one argument,
>> because there is no universal maximum or minimum. In R6RS, however, we
>> have +0.inf and -0.inf. I suggest, therefore, that (max) => -0.inf and
>> (min) => +0.inf. This also allows multiple-argument max and min to be
>> defined using a fold primitive ver two-argument versions.
>
> I can already see a problem with this. +0.inf and -0.inf are
> inexacts. Since e.g.
>
> (max 3.9 4) => 4.0 (see section 9.10.2.3)
>
> this would cause max and min to always return inexact numbers. This
> is definitely not desirable.
>
> Pete
>
> _______________________________________________
> r6rs-discuss mailing list
> r6rs-discuss_at_lists.r6rs.org
> http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
>
Received on Sat Dec 16 2006 - 23:42:21 UTC