Just verified that it is initialized correctly by gcc.3.0.4 on Red Hat
> Bug2: Europeanoption pricing on Unix:
> On windows the example Europeanoption gives:
> Method Value EstimatedError Discrepancy Rel. Discr.
> Black Scholes 5.8308 0.0000 0.000000 0.000000
> Call-Put parity 5.8308 N/A 4.44089e-15 0.000000
>
> Now on unix the same EuropeanOption gives:
>
> Method Value EstimatedError Discrepancy Rel. Discr.
> Black Scholes 3.2422 0.0000 0.000000 0.000000
> Call-Put parity 3.2422 N/A 0 0.000000
>
> You see that the result is not the same.
> We check the code and found that in "europeanoption.hpp" the following
> const static member is declared:
>
> static const Math::CumulativeNormalDistribution f_;
>
> This variable "f_" is never explicitly initialized, thus it
> is up to the
> compilor
> to decide what to do when it is first used.
>
> In VC++, "f_" is initialized through its' only construtor, and "sigma"
> value is set to "1".
> However, with gcc under UNIX, "f_" has not gone through any
> constructor,
> and "sigma" value
> is set to "0". So, the difference caused the error output on UNIX.
--------------------------------------------------
DISCLAIMER
This e-mail, and any attachments thereto, is intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information. If you are not the intended recipient of this
e-mail, you are hereby notified that any dissemination, distribution or
copying of this e-mail, and any attachments thereto, is strictly prohibited.
If you have received this e-mail in error, please immediately notify me and
permanently delete the original and any copy of any e-mail and any printout
thereof.
E-mail transmission cannot be guaranteed to be secure or error-free. The
sender therefore does not accept liability for any errors or omissions in
the contents of this message which arise as a result of e-mail transmission.
NOTICE REGARDING PRIVACY AND CONFIDENTIALITY
Knight Trading Group may, at its discretion, monitor and review the content
of all e-mail communications.