From 03f9ac82b3f9b2a7d60b361d7fe73eb38c18060f Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Thu, 3 Dec 2020 13:19:06 +0100 Subject: [PATCH] Relax the numerical precision a little bit when comparing real valued time values. Fixes bug no 536 reported by Victor Kuchynsky --- src/spicelib/devices/vsrc/vsrcacct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spicelib/devices/vsrc/vsrcacct.c b/src/spicelib/devices/vsrc/vsrcacct.c index c1740b494..1c265ef4b 100644 --- a/src/spicelib/devices/vsrc/vsrcacct.c +++ b/src/spicelib/devices/vsrc/vsrcacct.c @@ -284,7 +284,7 @@ VSRCaccept(CKTcircuit *ckt, GENmodel *inModel) int n = (int) floor(time / TS + 0.5); volatile double nearest = n * TS; - if(AlmostEqualUlps(nearest, time, 3)) { + if(AlmostEqualUlps(nearest, time, 10)) { /* carefully calculate `next' * make sure it is really identical * with the next calculated `nearest' value