From a13e93f5b75f6e56bc604c1d58be2424d5d44988 Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 9 Dec 2007 21:07:14 +0000 Subject: [PATCH] placeholder for agauss (y=nominal_value) --- src/frontend/numparam/xpressn.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index 5d26b67ee..53d58f2d8 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -36,6 +36,13 @@ ternary_fcn( int conditional, double if_value, double else_value ) else return else_value; } +static double +agauss( double nominal_val, double variation, double sigma ) +{ +/* just a placeholder */ + return nominal_val; +} + Intern Proc initkeys(void) /* the list of reserved words */ @@ -43,12 +50,12 @@ Begin scopy_up(keys, "and or not div mod if else end while macro funct defined" " include for to downto is var"); - scopy_up(fmath, "sqr sqrt sin cos exp ln arctan abs pow pwr max min int log ternary_fcn"); + scopy_up(fmath, "sqr sqrt sin cos exp ln arctan abs pow pwr max min int log ternary_fcn agauss"); EndProc Intern Func double mathfunction(int f, double z, double x) -/* the list of built-in functions. Patch 'fmath' and here to get more ...*/ +/* the list of built-in functions. Patch 'fmath', here and near line 888 to get more ...*/ Begin double y; Switch f @@ -876,8 +883,13 @@ Begin u=formula( dico, t, Addr(error)); state=1; /*atom*/ If fu>0 Then - if ( fu == 15 ) u= ternary_fcn((int)v,w,u); - else u= mathfunction(fu,v,u); + If ( fu == 15 ) Then + u=ternary_fcn((int)v,w,u) + ElsIf ( fu == 16 ) Then + u=agauss(v,w,u) + Else + u=mathfunction(fu,v,u) + EndIf EndIf EndIf i=k; fu=0;