[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: generic * and 0
From: |
Mikael Djurfeldt |
Subject: |
Re: generic * and 0 |
Date: |
Mon, 4 Dec 2006 19:26:12 +0100 |
2006/12/4, Kevin Ryde <address@hidden>:
While nosing around nearby stuff I noticed
(* 0 1.0) => 0
(* 0 1+1i) => 0
but
(* 1.0 0) => 0.0
(* 1+1i 0) => 0.0
which seems a bit inconsistent.
Indeed.
R5RS "Exactness" reads like either
exact or inexact is permitted, but I imagine it ought to be the same
whichever way around you write the args. I think I'll change the
latter two to exact 0.
Good idea. Because of paragraph 6.2.2, a program cannot expect to get
the result 0.0, and it seems like a strength of the implementation to
provide the additional piece of information that the result is indeed
*exactly* 0.
An added bonus is that it doesn't break the idea to have a common
abstract zero for the * operator. (Not entirely sure that the common
zero is a good idea, but I tend to think so.)
- Re: generic * and 0, Kevin Ryde, 2006/12/01
- Re: generic * and 0, Mikael Djurfeldt, 2006/12/01
- Re: generic * and 0, Kevin Ryde, 2006/12/01
- Re: generic * and 0, Kevin Ryde, 2006/12/03
- Re: generic * and 0,
Mikael Djurfeldt <=
- Re: generic * and 0, Kevin Ryde, 2006/12/04
- Re: generic * and 0, SZAVAI Gyula, 2006/12/05
- Re: generic * and 0, Mikael Djurfeldt, 2006/12/05
- Re: generic * and 0, Ludovic Courtès, 2006/12/05
- Re: generic * and 0, Mikael Djurfeldt, 2006/12/05
- Re: generic * and 0, Marius Vollmer, 2006/12/06
- Re: generic * and 0, Mikael Djurfeldt, 2006/12/07