diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULE.hxx.xml b/src/spicelib/devices/adms/admst/ngspiceMODULE.hxx.xml index ebfc032d6..0a7229f13 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULE.hxx.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULE.hxx.xml @@ -61,6 +61,14 @@ #define m00_abs(v00) ((v00)<(0)?(-(v00)):(v00)) #define m00_limexp(v00,x) v00 = ((x)<90.0?exp(x):EXP90*(x-89.0)); #define m10_limexp(v10,v00,x) v10 = ((x)<90.0?(v00):EXP90); +#define m00_atan2(v00,x,y) v00 = atan2(x,y); +// TODO atan2 derivatives ? +#define m00_acosh(v00,x) v00 = acosh(x); +#define m10_acosh(v10,v00,x) v10 = (1.0/(sqrt(x-1)*sqrt(x+1))); +#define m00_asinh(v00,x) v00 = asinh(x); +#define m10_asinh(v10,v00,x) v10 = (1.0/(sqrt(x*x+1))); +#define m00_atanh(v00,x) v00 = atanh(x); +#define m10_atanh(v10,v00,x) v10 = (1.0/(1-x*x)); #define m20_logE(v00) (-1.0/v00/v00) #define m20_exp(v00) exp(v00) @@ -102,6 +110,8 @@ inline double _acos(double arg) { return acos(arg); } inline double _d0_acos(double arg) { return (-1.0/sqrt(1-arg*arg)); } inline double _asin(double arg) { return asin(arg); } inline double _d0_asin(double arg) { return (+1.0/sqrt(1-arg*arg)); } +inline double _asinh(double arg) { return asinh(arg); } +inline double _d0_asinh(double arg) { return (1.0/sqrt(arg*arg + 1.0); } inline double _atan(double arg) { return atan(arg); } inline double _d0_atan(double arg) { return (+1.0/(1+arg*arg)); } inline double _logE(double arg) { return log(arg); } @@ -677,6 +687,7 @@ inline double _d1_pow(double x,double y) { return (x==0.0)?0.0:((log(x)/exp(0. @@ -1938,7 +1949,7 @@ inline double _d1_pow(double x,double y) { return (x==0.0)?0.0:((log(x)/exp(0. - + @@ -2022,7 +2033,7 @@ inline double _d1_pow(double x,double y) { return (x==0.0)?0.0:((log(x)/exp(0. - + @@ -2091,7 +2102,7 @@ inline double _d1_pow(double x,double y) { return (x==0.0)?0.0:((log(x)/exp(0. - + @@ -2125,7 +2136,7 @@ inline double _d1_pow(double x,double y) { return (x==0.0)?0.0:((log(x)/exp(0. - + diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml index 620b5c88a..9f1193c4a 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml @@ -139,6 +139,8 @@ if(isinf((double) var)) \\ #define _d_sin(val,dval,arg) val = sin(arg); dval = (cos(arg)); #define _tan(val,arg) val = tan(arg); #define _d_tan(val,dval,arg) val = tan(arg); dval = (1.0/cos(arg)/cos(arg)); +#define _asinh(val,arg) val = asinh(arg); +#define _d_asinh(val,dval,arg) val = asinh(arg); dval = (1.0/sqrt(arg*arg + 1)); #define _hypot(xy,x,y) xy = sqrt((x)*(x)+(y)*(y)); #define _dx_hypot(dx,xy,x,y) dx = (x)/(xy); #define _dy_hypot(dy,xy,x,y) dy = (y)/(xy);