res/restemp.c, avoid temporary NaN value, (simplify debugging)
RESupdate_conduct() may be called several times before all parameters have been set via RESparam() invocations, or finally being set to default values in RESsetup() Especially RESscale might still be 0.0 as well as RESm thus temporarily creating a NaN in RESupdate_conduct. This would unnecessarily complicate debugging with enabled floating point exceptions.
This commit is contained in:
parent
ead6dc4816
commit
e725d728fc
|
|
@ -98,6 +98,9 @@ RESupdate_conduct(RESinstance *here, bool spill_warnings)
|
|||
else
|
||||
factor = (((tc2 * difference) + tc1) * difference) + 1.0;
|
||||
|
||||
if (!here->RESscaleGiven)
|
||||
here->RESscale = 1;
|
||||
|
||||
here->RESconduct = here->RESm / (here->RESresist * factor * here->RESscale);
|
||||
|
||||
/* Paolo Nenzi: AC value */
|
||||
|
|
|
|||
Loading…
Reference in New Issue