[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: generic * and 0
From: |
Kevin Ryde |
Subject: |
Re: generic * and 0 |
Date: |
Tue, 05 Dec 2006 11:00:28 +1100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
"Mikael Djurfeldt" <address@hidden> writes:
>
> Good idea.
I made the change.
> 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.
If you wanted an argument the other way, returning a flonum zero could
give negative zero for say "(* 0 -1.0)". But I'd favour exactness,
since the result is certainly exactly zero.
> (Not entirely sure that the common zero is a good idea, but I tend
> to think so.)
I suppose it's a question of whether "*" should do that, or leave it
up to the application.
The only case I can think of where a common zero may not be good is
with matrices, where "(* 0 matrix) => matrix" could preserve the
dimensions of the input matrix in the output matrix. Those dimensions
could be used later "(* matrix matrix)", to signal an error if the
dimensions were incompatible.
- 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, 2006/12/04
- Re: generic * and 0,
Kevin Ryde <=
- 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