[r6rs-discuss] [Formal] Max and min with zero arguments
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
Received on Sat Dec 16 2006 - 23:24:20 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:00 UTC