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.
This commit is contained in:
rlar 2014-09-12 19:07:19 +02:00
parent abfd38b535
commit 2602a492b2
2 changed files with 2 additions and 2 deletions

View File

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

View File

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