[r6rs-discuss] [Formal] Max and min with zero arguments

From: John Cowan <cowan>
Date: Sun Dec 17 22:58:09 2006

Peter Gavin scripsit:

> 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.

Quite so, which means the fold implementation is unusable directly
(too bad). Conceptually, though, (max) and (min) could still return
infinite values which are compelled to be inexact because there are
no exact infinities (nor should there be) in Scheme.

-- 
John Cowan              http://www.ccil.org/~cowan      cowan_at_ccil.org
"After all, would you consider a man without honor wealthy, even if his
Dinar laid end to end would reach from here to the Temple of Toplat?"
"No, I wouldn't", the beggar replied.  "Why is that?" the Master asked.
"A Dinar doesn't go very far these days, Master.        --Kehlog Albran
Besides, the Temple of Toplat is across the street."      The Profit
Received on Sun Dec 17 2006 - 22:57:58 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC