From 3d2b9c7e7b1a7acfdc209e9614ada32a99279d74 Mon Sep 17 00:00:00 2001
From: michel <michel@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Thu, 4 Sep 2008 01:01:36 +0000
Subject: [PATCH] added short cut for standardized cummulative normal
 distribution

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2030 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 preprocessor/DynareBison.yy | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy
index 740861d0aa..b5f8e3e831 100644
--- a/preprocessor/DynareBison.yy
+++ b/preprocessor/DynareBison.yy
@@ -357,6 +357,12 @@ expression : '(' expression ')'
              { $$ = driver.add_unknown_function($1); }
            | NORMCDF '(' expression COMMA expression COMMA expression ')'
              { $$ = driver.add_normcdf($3,$5,$7);}
+           | NORMCDF '(' expression ')'
+             { 
+               string *zero = new string("0");
+               string *one = new string("1");
+               $$ = driver.add_normcdf($3,driver.add_constant(zero),driver.add_constant(one));
+             }
            ;
 
 comma_expression : expression
@@ -503,6 +509,12 @@ hand_side : '(' hand_side ')'
              { $$ = driver.add_min($3 , $5); }
           | NORMCDF '(' hand_side COMMA hand_side COMMA hand_side ')'
              { $$ = driver.add_normcdf($3,$5,$7);}
+          | NORMCDF '(' hand_side ')'
+             { 
+               string *zero = new string("0");
+               string *one = new string("1");
+               $$ = driver.add_normcdf($3,driver.add_constant(zero),driver.add_constant(one));
+             }
           ;
 
 pound_expression: '#' NAME EQUAL hand_side ';'
-- 
GitLab