"Mikael Djurfeldt" <[EMAIL PROTECTED]> 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.


_______________________________________________
Bug-guile mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-guile

Reply via email to