avoiding roundoff
Posted: Sat May 30, 2009 2:43 am
In my NMODL code
P_v-1 evaluates to -3.68653e-06
exp(-((t-tsyn)/tau_VDD)) evaluates to 6.14421e-06
((P_v-1) * exp(-((t-tsyn)/tau_VDD))) evaluates to -2.26508e-11
But 1 + ((P_v-1) * exp(-((t-tsyn)/tau_VDD))) evaluates to 1.
Is there some way to avoid this roundoff?
P_v-1 evaluates to -3.68653e-06
exp(-((t-tsyn)/tau_VDD)) evaluates to 6.14421e-06
((P_v-1) * exp(-((t-tsyn)/tau_VDD))) evaluates to -2.26508e-11
But 1 + ((P_v-1) * exp(-((t-tsyn)/tau_VDD))) evaluates to 1.
Is there some way to avoid this roundoff?