[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: srfi-73@xxxxxxxxxxxxxxxxx*Subject*: Sorry to continue on this subject, but...*From*: Panu A Kalliokoski <atehwa@xxxxxxxx>*Date*: Tue, 5 Jul 2005 14:49:49 +0300*Delivered-to*: srfi-73@xxxxxxxxxxxxxxxxx*User-agent*: Mutt/1.4.1i

1. I'm glad to see that -0 will be removed. In the current reference implementation, (+ 1 -1) returns 0, as does (+ -1 1), and it's very hard for me to see why 0 is privileged over -0 in this case. 2. As you can probably guess from the fuss created by -0, exact infinities sure as hell are not reciprocals of 0. Infinities can be created by calculating a limit of lim x->(+)0 (1/x), but the existence of a limit is required. This is because 0 _really is_ -0, and consequently, 1/0 _really is_ 1/-0, that is, undefined. So you might have two things to do, which are relatively orthogonal: (a) define an exact NaN value, which is the result of division by zero, and provide rules for handling NaN wrt basic arithmetic and boolean operations (things like (> 0 NaN) are especially problematic); (b) define exact (negative and positive) infinity, which are greater in magnitude than any finitary exact number, but cannot be manipulated much in any way; for example, (+ 1 inf) cannot evaluate to inf, because this will break the numeric system. These infinities cannot be obtained as a result from any calculation, but one can use them as literals. I think the latter might have some value, for example as initialisation values for algorithms searching for a maximum value in a list etc. Panu -- personal contact: atehwa@xxxxxx, +35841 5323835, +3589 85619369 work contact: pkalliok@xxxxxxxxxxxxxxxx, +35850 3678003 kotisivu (henkkoht): http://www.iki.fi/atehwa/ homepage (technical): http://sange.fi/~atehwa/

- Prev by Date:
**Re: comparison operators and *typos** - Previous by thread:
**Revision of SRFI 73 available** - Index(es):