xpressn.c, fix semantics of `int(x)' and remove dangerous macros

int(x) most probably shall be trunc(x) instead of floor(x)
  note trunc(x) was #defined beeing floor(x)
  note ln(x) was #defined beeing log(x)
This commit is contained in:
rlar 2013-11-24 14:16:24 +01:00
parent 2854fa71d4
commit 76c7cd6fbd
2 changed files with 3 additions and 6 deletions

View File

@ -9,9 +9,6 @@
/***** numparam internals ********/
#define ln(x) log(x)
#define trunc(x) floor(x)
typedef enum {Nodekey = '#'} _nNodekey; /* Introduces node symbol */
typedef enum {Intro = '&'} _nIntro; /* Introduces preprocessor tokens */
typedef enum {Comment = '*'} _nComment; /* Spice Comment lines */

View File

@ -124,8 +124,8 @@ mathfunction(int f, double z, double x)
case 5:
y = exp(x);
break;
case 6:
y = ln(x);
case 6: /* ln(x) */
y = log(x);
break;
case 7:
y = atan(x);
@ -145,7 +145,7 @@ mathfunction(int f, double z, double x)
case 12:
y = MIN(x, z);
break;
case 13:
case 13: /* int(x) */
y = trunc(x);
break;
case 14: