Skip to content
Prev 28480 / 63468 Next

prod(0, 1:1000) ; 0 * Inf etc

G'day Martin,

On Mon, 21 Apr 2008 18:40:43 +0200
Martin Maechler <maechler at stat.math.ethz.ch> wrote:

            
Many may also expect that prod(x) and prod(rev(x)) are equivalent.
Unfortunately, this does not hold in finite precision arithmetic:
[1] 0
[1] NA
[1] NA

It might be better to educate useRs on finite precision arithmetic
than trying to catch such situations.  Note, I am saying "better", not
"easier". :-)  

Cheers,
	
	Berwin