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:
parent
c900cc8824
commit
84761c125f
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue