From 93a212ca3c1935daacc494dbd125296e84d9bf3e Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 12 Sep 2014 19:05:56 +0200 Subject: [PATCH] cleanup, rename PTlog --> PTlog10, PTF_LOG --> PTF_LOG10 (`B' language) --- src/include/ngspice/inpptree.h | 2 +- src/spicelib/parser/inpptree.c | 4 ++-- src/spicelib/parser/inpxx.h | 2 +- src/spicelib/parser/ptfuncs.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/ngspice/inpptree.h b/src/include/ngspice/inpptree.h index 77804890d..6e8a680d1 100644 --- a/src/include/ngspice/inpptree.h +++ b/src/include/ngspice/inpptree.h @@ -101,7 +101,7 @@ void INPptPrint(char *str, IFparseTree * ptree); #define PTF_COSH 7 #define PTF_EXP 8 #define PTF_LN 9 -#define PTF_LOG 10 +#define PTF_LOG10 10 #define PTF_SIN 11 #define PTF_SINH 12 #define PTF_SQRT 13 diff --git a/src/spicelib/parser/inpptree.c b/src/spicelib/parser/inpptree.c index fee3b157c..1f6d12585 100644 --- a/src/spicelib/parser/inpptree.c +++ b/src/spicelib/parser/inpptree.c @@ -144,7 +144,7 @@ static struct func { { "cosh", PTF_COSH, (void(*)(void)) PTcosh } , { "exp", PTF_EXP, (void(*)(void)) PTexp } , { "ln", PTF_LN, (void(*)(void)) PTln } , - { "log", PTF_LOG, (void(*)(void)) PTlog } , + { "log", PTF_LOG10, (void(*)(void)) PTlog10 } , { "sgn", PTF_SGN, (void(*)(void)) PTsgn } , { "sin", PTF_SIN, (void(*)(void)) PTsin } , { "sinh", PTF_SINH, (void(*)(void)) PTsinh } , @@ -435,7 +435,7 @@ static INPparseNode *PTdifferentiate(INPparseNode * p, int varnum) arg1 = mkb(PT_DIVIDE, mkcon(1.0), p->left); break; - case PTF_LOG: /* log(e) / u */ + case PTF_LOG10: /* log(e) / u */ arg1 = mkb(PT_DIVIDE, mkcon(M_LOG10E), p->left); break; diff --git a/src/spicelib/parser/inpxx.h b/src/spicelib/parser/inpxx.h index 491e3b42c..205e62469 100644 --- a/src/spicelib/parser/inpxx.h +++ b/src/spicelib/parser/inpxx.h @@ -56,7 +56,7 @@ double PTcos(double arg); double PTcosh(double arg); double PTexp(double arg); double PTln(double arg); -double PTlog(double arg); +double PTlog10(double arg); double PTsin(double arg); double PTsinh(double arg); double PTsqrt(double arg); diff --git a/src/spicelib/parser/ptfuncs.c b/src/spicelib/parser/ptfuncs.c index 0f9155d85..31968d866 100644 --- a/src/spicelib/parser/ptfuncs.c +++ b/src/spicelib/parser/ptfuncs.c @@ -232,7 +232,7 @@ PTln(double arg) } double -PTlog(double arg) +PTlog10(double arg) { if (arg < 0.0) return (HUGE);