I posted the following back in November. It is MacOS only, as it takes
advantage of the erf function in the MacOS Math libraries. This
function also exists in Linux, so one could add a Linux declaration
below. It should be present in Windows, but I cannot find it under
this name.
Charles Yeomans
Function NORMDIST(x as Double, mu as Double, sigma as Double,
cumulative as Boolean = true) as Double
Soft Declare Function erf Lib "Carbon.framework" (x as Double) as
Double
If cumulative then
Return .5*(1.0 + erf(sqrt(.5)*(x - mu)/sigma))
Else
Return exp(-.5*(x - mu)*(x -
mu)/(sigma*sigma))/(sigma*Sqrt(8.0*ATan(1)))
End if
End Function
On Mar 9, 2006, at 11:38 PM, Paul Rehill wrote:
Is there a known MBS or realbasic function for the standard normal
cumulative distribution function?
Thanks in advance
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>