Re: please check my homework
- From: Willem <willem@xxxxxxxx>
- Date: Wed, 2 Nov 2005 09:31:57 +0000 (UTC)
Michael wrote:
) "David Marsh" <dmarsh@xxxxxxxx> wrote in message
) news:ncS9f.387916$tl2.221612@xxxxxxxxxxx
)> long double binom_prob(long double p,long double n,long double x)
)> {
)> long double k, t1, t2, t3;
)>
)> k = 1.0;
)> t1 = n / x;
)> while(k < x)
)> {
)> t1 *= (n - k) / (x - k);
)
) Here you could even replace "(x-k)" with "k".
That wouldn't be as good an option, because then the intermediate values
would become larger, and therefore less accurate.
)> k++;
)> }
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
.
- References:
- Re: please check my homework
- From: David Marsh
- Re: please check my homework
- Prev by Date: Re: manual
- Next by Date: range search algorithm?
- Previous by thread: Re: please check my homework
- Next by thread: Re: please check my homework
- Index(es):
Relevant Pages
|