Re: Possible bug in Examples/EquityOption/EquityOption.cpp

Posted by Bojan Nikolic on
URL: http://quantlib.414.s1.nabble.com/Possible-bug-in-Examples-EquityOption-EquityOption-cpp-tp7982p7984.html


Yan Kuang <[hidden email]> writes:

> So it's a problem of 'cout', I can's see any wrong usages of 'cout' in the
> code, but I am no expert on the 'cout'

The problem is in the

std::cout << std::fixed << std::setprecision(0)

line which sets the precision of printed numbers to zero. You need a
corresponding line at the top like

std::cout << std::fixed << std::setprecision(7)

to set the cout system to print some decimal digits.

Best,
Bojan

--
Bojan Nikolic          ||          http://www.bnikolic.co.uk

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users