devices/res/resnoise.c, cleanup using pow()

This commit is contained in:
rlar 2017-10-21 11:43:34 +02:00
parent abb07c4306
commit f73a353d6b
1 changed files with 3 additions and 3 deletions

View File

@ -103,9 +103,9 @@ RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
printf("DC current in resistor %s: %e\n",inst->RESname, inst->REScurrent);
#endif
noizDens[RESFLNOIZ] *= inst->RESm * model->RESfNcoef * exp(model->RESfNexp *
log(MAX(fabs(inst->REScurrent),
N_MINLOG))) / (inst->RESeffNoiseArea*pow(data->freq,model->RESef));
noizDens[RESFLNOIZ] *= inst->RESm * model->RESfNcoef *
pow(fabs(inst->REScurrent), model->RESfNexp)
/ (inst->RESeffNoiseArea * pow(data->freq, model->RESef));
lnNdens[RESFLNOIZ] = log(MAX(noizDens[RESFLNOIZ],N_MINLOG));
noizDens[RESTOTNOIZ] = noizDens[RESTHNOIZ] + noizDens[RESFLNOIZ];