From 697b9da074ad1ad79435481472f16d699f1890eb Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 21 Jan 2018 15:52:23 +0100 Subject: [PATCH] prevent endless loop if factor finally equals 1 --- src/spicelib/analysis/cktop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spicelib/analysis/cktop.c b/src/spicelib/analysis/cktop.c index e9b1fb075..3f72162cf 100644 --- a/src/spicelib/analysis/cktop.c +++ b/src/spicelib/analysis/cktop.c @@ -183,7 +183,7 @@ dynamic_gmin (CKTcircuit *ckt, long int firstmode, } if (iters > (3 * ckt->CKTdcTrcvMaxIter / 4)) - factor = sqrt (factor); + factor = MAX(sqrt (factor), 1.00005); OldGmin = ckt->CKTdiagGmin;