comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » binomial function change
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
binomial function change [message #32248] Mon, 23 September 2002 21:15
air_jlin is currently offline  air_jlin
Messages: 22
Registered: July 2001
Junior Member
hi all,

maybe this was documented in the "what's new" back when idl 5.4
shipped, but since i couldn't find the change mentioned in places i
have access to (archives of this group, rsi tech tips, etc.), when i
was trying to debug a program i was writing in idl 5.3 that used
binomial(), i thought i'd mention it here to save anyone else from
wondering "what's going on?".

in idl 5.5, the following call returns the following result:
IDL> print,binomial(4,30,0.05)
% Compiled module: BINOMIAL.
0.0607712
% Program caused arithmetic error: Floating underflow

this result is correct.

in idl 5.3, this is what you get:
IDL> print,binomial(4,30,0.05)
% Compiled module: BINOMIAL.
% Compiled module: GAUSS_PDF.
0.0181180

the difference appears to be that for values of n>25, the 5.3 routine
defaults to calculating the cumulative binomial distribution using a
gaussian approximation.

best,
-Johnny


-------------------------------------------
Johnny Lin
CIRES, University of Colorado
Work Phone: (303) 735-1636
Web: http://cires.colorado.edu/~johnny/
-------------------------------------------
[Message index]
 
Read Message
Previous Topic: User Forum now available on RSI site
Next Topic: M.S. IDL Library?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:10:37 PDT 2025

Total time taken to generate the page: 0.00828 seconds