Neil Jerram <n...@ossau.uklinux.net> writes: >> * libguile/numbers.c (scm_product): Handle exact 0 differently. A >> product containing an exact 0 now returns an exact 0 if and only if >> the other arguments are all exact. > > I don't get this one. I would expect "... are all finite".
I almost wrote "... are all finite and exact", but exact implies finite, so I simplified it. > Why would an exact 0 times a finite number be inexact? The point of the exact/inexact distinction is to ensure that if you see an exact number, you can trust that it is provably the correct answer, and that no inaccuracies associated with inexact arithmetic along the way could possibly have corrupted that answer. In this case, the inaccuracies associated with inexact arithmetic could result in an infinity being misrepresented as a finite number, or vice versa. For example, if X is inexact, then we cannot claim that the result of (* 0 (/ X)) is an exact 0, because a small change in X could affect the final answer. Best, Mark