fix erfc() usage in cider

cider relied on our broken ngspice variant of erfc() which behaved as
  erfc_ngspice(x) = erfc(fabs(x))

Note:
  apart from cider, erfc is used in
    devices/ltra/ltramisc.c
      always with positive argument
  and
    src/frontend/spec.c
      again always with positive argument
Thus, the difference in implementation
 never mathered anywhere except in cider
This commit is contained in:
rlar 2017-10-28 12:35:50 +02:00
parent c900cc8824
commit 84761c125f
2 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ ONEdopingValue(DOPprofile *pProfile, DOPtable *pTable, double x)
if (argP > 10.0) {
value = 0.0;
} else {
value = pProfile->PEAK_CONC * erfc(-argP);
value = pProfile->PEAK_CONC * erfc(argP);
}
break;
case LOOKUP:

View File

@ -111,7 +111,7 @@ TWOdopingValue(DOPprofile *pProfile, DOPtable *pTable, double x,
if ( argP > 10.0 ) {
value = 0.0;
} else {
value = pProfile->PEAK_CONC * erfc( -argP );
value = pProfile->PEAK_CONC * erfc( argP );
}
break;
case LOOKUP:
@ -156,7 +156,7 @@ TWOdopingValue(DOPprofile *pProfile, DOPtable *pTable, double x,
if ( argP > 10.0 ) {
value = 0.0;
} else {
value *= erfc( -argL );
value *= erfc( argL );
}
break;
case LOOKUP: