Browse Source

Improve convergence in Infineon Power MOS.

0**something is 0
pre-master-46
Holger Vogt 1 year ago
parent
commit
8c806912d0
  1. 4
      src/spicelib/parser/ptfuncs.c

4
src/spicelib/parser/ptfuncs.c

@ -70,7 +70,9 @@ PTpower(double arg1, double arg2)
{ {
double res; double res;
if (newcompat.lt) { if (newcompat.lt) {
if(arg1 >= 0)
if (arg1 == 0)
res = 0;
else if(arg1 > 0)
res = pow(arg1, arg2); res = pow(arg1, arg2);
else { else {
/* If arg2 is quasi an integer, round it to have pow not fail /* If arg2 is quasi an integer, round it to have pow not fail

Loading…
Cancel
Save