Re: please check my homework



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
.



Relevant Pages