Discussion:
[Graph-support] area bug(?)
Tom Gettys
2009-05-18 18:41:40 UTC
Permalink
f(x)=dnorm(x,166.3, 26/sqrt(40))



area under path:

from: 173.06

to: 1000

area: 0.05 (correct)



when I add one more zero to the to: value, the area becomes 0.0826, which is
incorrect



Tom Gettys

2929 Warren Street

Eugene, Oregon 97405

(541) 683-1940



To dream of the person you would like to be

is to waste the person you are.
Ivan Johansen
2009-05-18 22:01:10 UTC
Permalink
Post by Tom Gettys
f(x)=dnorm(x,166.3, 26/sqrt(40))
from: 173.06
to: 1000
area: 0.05 (correct)
when I add one more zero to the to: value, the area becomes 0.0826,
which is incorrect
This is an unfortunately side effect of the algorithm (Simpson's
formula) used to calculate the area. When the range gets large rounding
errors starts to accumulate. When I find the time I plan to search for a
better algorithm.

Best regards
Ivan Johansen
Tom Gettys
2009-05-19 00:35:55 UTC
Permalink
No problem - I thought it might be something like that, but wanted to report
it in case it was a real bug.

Tom Gettys
2929 Warren Street
Eugene, Oregon 97405
(541) 683-1940

To dream of the person you would like to be
is to waste the person you are.

-----Original Message-----
From: Ivan Johansen [mailto:***@padowan.dk]
Sent: Monday, May 18, 2009 3:01 PM
To: graph-***@lists.sourceforge.net
Subject: Re: [Graph-support] area bug(?)
Post by Tom Gettys
f(x)=dnorm(x,166.3, 26/sqrt(40))
from: 173.06
to: 1000
area: 0.05 (correct)
when I add one more zero to the to: value, the area becomes 0.0826,
which is incorrect
This is an unfortunately side effect of the algorithm (Simpson's
formula) used to calculate the area. When the range gets large rounding
errors starts to accumulate. When I find the time I plan to search for a
better algorithm.

Best regards
Ivan Johansen


----------------------------------------------------------------------------
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects

Loading...