Browse Source

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.
pre-master-46
rlar 12 years ago
parent
commit
2602a492b2
  1. 2
      src/frontend/parse.c
  2. 2
      src/spicelib/parser/inpptree.c

2
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 },

2
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 } ,

Loading…
Cancel
Save