Re: [QuantLib-svn] SF.net SVN: quantlib: [14167] trunk/QuantLib

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Re-QuantLib-svn-SF-net-SVN-quantlib-14167-trunk-QuantLib-tp11626.html


On Wed, 2008-01-23 at 08:40 -0800, [hidden email] wrote:

> Revision: 14167
>           http://quantlib.svn.sourceforge.net/quantlib/?rev=14167&view=rev
> Author:   nando
> Date:     2008-01-23 08:40:46 -0800 (Wed, 23 Jan 2008)
>
> Log Message:
> -----------
> ... (warning: also moved displacement parameter in the same place as other functions)
>
> Modified: trunk/QuantLib/ql/pricingengines/blackformula.hpp
> ===================================================================
> --- trunk/QuantLib/ql/pricingengines/blackformula.hpp 2008-01-23 16:25:24 UTC (rev 14166)
> +++ trunk/QuantLib/ql/pricingengines/blackformula.hpp 2008-01-23 16:40:46 UTC (rev 14167)
> @@ -93,9 +93,10 @@
>                                     Real forward,
>                                     Real blackPrice,
>                                     Real discount = 1.0,
> +                                   Real displacement = 0.0,
>                                     Real guess = Null<Real>(),
>                                     Real accuracy = 1.0e-6,
> -                                   Real displacement = 0.0);
> +                                   Natural maxIterations = 100);
>  

Nando,
        consistency might be less important than usability in this case. Is the
displacement parameter more likely to be specified than the guess or the
accuracy? If not, it should stay where it was before. Also, it bothers
me that, if you move a default parameter like you did, old code will
keep compiling without as much as a warning but will behave
differently---the guess will be used as a displacement. It's gonna be a
hard one to debug for the poor users that don't read the SVN messages
(i.e., most of them...)

Luigi


--

Never mistake motion for action.
-- Ernest Hemingway



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev