From 2602a492b20eddac69498d9d678beaa374c552a6 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 12 Sep 2014 19:07:19 +0200 Subject: [PATCH] fix `log' in `B' and in `.control', to base e instead of 10 In the B language this can be considered a bug fix. In the .control language this is a severe change and breaks backwards compatibility. In all three languages 'numparam' 'B' and '.control' we now have ln to the base e log to the base e log10 to the base 10 Thus log and log10 is now consistent with the vast majority of programming languages. ln is merely for convenience. very few other languages have it. I'd like to discourage its usage. --- src/frontend/parse.c | 2 +- src/spicelib/parser/inpptree.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/parse.c b/src/frontend/parse.c index 023455833..23ad4bd50 100644 --- a/src/frontend/parse.c +++ b/src/frontend/parse.c @@ -149,7 +149,7 @@ struct func ft_funcs[] = { { "imag", cx_imag }, { "im", cx_imag }, { "db", cx_db }, - { "log", cx_log10 }, + { "log", cx_log }, { "log10", cx_log10 }, { "ln", cx_log }, { "exp", cx_exp }, diff --git a/src/spicelib/parser/inpptree.c b/src/spicelib/parser/inpptree.c index 9588fd7cd..02a2d2f63 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_LOG, (void(*)(void)) PTlog } , - { "log", PTF_LOG10, (void(*)(void)) PTlog10 } , + { "log", PTF_LOG, (void(*)(void)) PTlog } , { "log10", PTF_LOG10, (void(*)(void)) PTlog10 } , { "sgn", PTF_SGN, (void(*)(void)) PTsgn } , { "sin", PTF_SIN, (void(*)(void)) PTsin } ,