From 077e61e2c2ee5361b3a69b3bb5e3c55fd0e28f54 Mon Sep 17 00:00:00 2001 From: sebastien Date: Mon, 4 May 2009 12:59:21 +0000 Subject: [PATCH] trunk preprocessor: * fixed bug with normcdf() when converting to static model * fixed description of derivative computation git-svn-id: https://www.dynare.org/svn/dynare/trunk@2655 ac1d8469-bf42-47a9-8791-bf33cf982152 --- preprocessor/ExprNode.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc index a890f766a..4e1cb6aa5 100644 --- a/preprocessor/ExprNode.cc +++ b/preprocessor/ExprNode.cc @@ -1583,8 +1583,8 @@ TrinaryOpNode::computeDerivative(int deriv_id) //intermediary sum t11 = datatree.AddMinus(t14,t12); // total derivative: - // (darg1/sigma - darg2/sigma - darg3*(x-mu)/sigma)* t13 - // where t13 is the derivative of a standardized normal + // (darg1/sigma - darg2/sigma - darg3*(x-mu)/sigma^2) * t15 + // where t15 is the derivative of a standardized normal return datatree.AddTimes(t11, t15); } // Suppress GCC warning @@ -1801,7 +1801,7 @@ TrinaryOpNode::toStatic(DataTree &static_datatree) const { NodeID sarg1 = arg1->toStatic(static_datatree); NodeID sarg2 = arg2->toStatic(static_datatree); - NodeID sarg3 = arg2->toStatic(static_datatree); + NodeID sarg3 = arg3->toStatic(static_datatree); switch(op_code) { case oNormcdf: