Skip to content
Prev 38637 / 63424 Next

0.5 != integrate(dnorm,0,20000) = 0

I'd suggest that the original sin here is calling some particular
numerical integration routine 'integrate', which gives the user an
illusory sense of power.... Functions have to be well-behaved in
various ways for quadrature to work well, and you've got to expect
things like
Error in integrate(function(x) tan(x), 0, pi) :
  roundoff error is detected in the extrapolation table   <<< a 'good'
error -- tells the user something's wrong
1751.054 with absolute error < 0                                  <<< oops
Error in integrate(function(x) 1/(x - pi/2)^2, 0, pi) :         <<<
gets a useful error in this form
  non-finite function value

But by that argument, I suppose you shouldn't call floating-point
addition "+" :-)

                -s