From 1d0d05cee1f9b5b14bb843c89b4a5306e26b0e83 Mon Sep 17 00:00:00 2001 From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152> Date: Fri, 17 Apr 2009 21:22:44 +0000 Subject: [PATCH] trunk preprocessor: fixed bug with normcdf derivative (introduced in r2596) git-svn-id: https://www.dynare.org/svn/dynare/trunk@2598 ac1d8469-bf42-47a9-8791-bf33cf982152 --- ExprNode.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExprNode.cc b/ExprNode.cc index 56ac48cd..a8e5a3a0 100644 --- a/ExprNode.cc +++ b/ExprNode.cc @@ -1541,7 +1541,7 @@ TrinaryOpNode::computeDerivative(int deriv_id) // -(x-mu)^2/sigma^2 t13 = datatree.AddUMinus(t12); // -((x-mu)^2/sigma^2)/2 - t12 = datatree.AddDivide(t13,t11); + t12 = datatree.AddDivide(t13, datatree.Two); // exp(-((x-mu)^2/sigma^2)/2) t13 = datatree.AddExp(t12); // derivative of a standardized normal -- GitLab