door GMe » ma 28 okt 2002, 15:13
{*******************************************************************
Description: This Function returns Standard Cummulative Normal Density
Provided By: Omega Research, Inc. (c) Copyright 1999
********************************************************************}
Inputs: Price(Numeric);
Variables: Answer(0), x(0), y(0), z(0);
y = 1 / (1 + .2316419 * AbsValue(Price)); ? ? ?
z = .3989423 * ?Power(2.71828183, -(Price * Price) / 2);
x = 1 - z * ((1.33027443 * Power(y, 5)) - (1.821256 * Power(y, 4)) + (1.78147794 * Power(y, 3)) - (.3565638 * Power(y, 2)) + (.31938153 * y));
If Price > 0 Then
Answer = x
Else
Answer = 1 - x;
NormalSCDensity = Answer; ? ?