diff --git a/src/frontend/numparam/general.h b/src/frontend/numparam/general.h index e85aa757a..f8683fb75 100644 --- a/src/frontend/numparam/general.h +++ b/src/frontend/numparam/general.h @@ -41,6 +41,5 @@ int yes_or_no(void); int freadstr(FILE *f, SPICE_DSTRINGPTR dstr_p); double np_round(double d); // sjb to avoid clash with round() in math.h -double np_trunc(double x); // sjb to avoid clash with trunc() in math.h double absf(double x); /* abs */ long absi(long i); diff --git a/src/frontend/numparam/mystring.c b/src/frontend/numparam/mystring.c index 9cebee928..c773d6893 100644 --- a/src/frontend/numparam/mystring.c +++ b/src/frontend/numparam/mystring.c @@ -479,13 +479,3 @@ np_round(double r) { return floor(r + 0.5); } - - -double -np_trunc(double r) -{ - if (r >= 0.0) - return floor(r); - else - return ceil(r); -} diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index 49b751c98..c2cbfb190 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -843,11 +843,11 @@ operate(char op, double x, double y) x = z; break; case '%': /* % */ - t = np_trunc(x / y); + t = trunc(x / y); x = x - y * t; break; case '\\': /* / */ - x = np_trunc(fabs(x / y)); + x = trunc(fabs(x / y)); break; }