Relax the numerical precision a little bit when
comparing real valued time values. Fixes bug no 536 reported by Victor Kuchynsky
This commit is contained in:
parent
ffd440fdd5
commit
9335aa10ea
|
|
@ -284,7 +284,7 @@ VSRCaccept(CKTcircuit *ckt, GENmodel *inModel)
|
||||||
int n = (int) floor(time / TS + 0.5);
|
int n = (int) floor(time / TS + 0.5);
|
||||||
volatile double nearest = n * TS;
|
volatile double nearest = n * TS;
|
||||||
|
|
||||||
if(AlmostEqualUlps(nearest, time, 3)) {
|
if(AlmostEqualUlps(nearest, time, 10)) {
|
||||||
/* carefully calculate `next'
|
/* carefully calculate `next'
|
||||||
* make sure it is really identical
|
* make sure it is really identical
|
||||||
* with the next calculated `nearest' value
|
* with the next calculated `nearest' value
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue