From cce47bb50dca3bb03ae4cd79a10d17e36a589c5c Mon Sep 17 00:00:00 2001 From: dwarning Date: Wed, 28 Nov 2007 17:20:39 +0000 Subject: [PATCH] fix the arg order for pow --- src/frontend/numparam/xpressn.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index f0ad33b66..5d26b67ee 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -52,20 +52,20 @@ Func double mathfunction(int f, double z, double x) Begin double y; Switch f - CaseOne 1 Is y= x*x - Case 2 Is y= sqrt(x) - Case 3 Is y= sin(x) - Case 4 Is y= cos(x) - Case 5 Is y= exp(x) - Case 6 Is y= ln(x) - Case 7 Is y= atan(x) - Case 8 Is y= fabs(x) - Case 9 Is y= pow(x,z) - Case 10 Is y= exp( x* ln(fabs(z))) - Case 11 Is y= max( x, z ) - Case 12 Is y= min( x, z ) - Case 13 Is y= trunc( x ) - Case 14 Is y= log(x) + CaseOne 1 Is y = x*x + Case 2 Is y = sqrt(x) + Case 3 Is y = sin(x) + Case 4 Is y = cos(x) + Case 5 Is y = exp(x) + Case 6 Is y = ln(x) + Case 7 Is y = atan(x) + Case 8 Is y = fabs(x) + Case 9 Is y = pow(z,x) + Case 10 Is y = exp(x*ln(fabs(z))) + Case 11 Is y = max(x,z) + Case 12 Is y = min(x,z) + Case 13 Is y = trunc(x) + Case 14 Is y = log(x) Default y=x EndSw return y EndFunc @@ -876,7 +876,7 @@ Begin u=formula( dico, t, Addr(error)); state=1; /*atom*/ If fu>0 Then - if ( fu == 14 ) u= ternary_fcn((int)v,w,u); + if ( fu == 15 ) u= ternary_fcn((int)v,w,u); else u= mathfunction(fu,v,u); EndIf EndIf