From ff11ccda2039ca142468f9a77fc228e47afdd32d Mon Sep 17 00:00:00 2001 From: h_vogt Date: Tue, 5 Jun 2012 23:49:29 +0200 Subject: [PATCH] In B source the argument to 'log' may be 0 upon start of simulation, allow recovery like in function 'ln' --- src/spicelib/parser/ptfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spicelib/parser/ptfuncs.c b/src/spicelib/parser/ptfuncs.c index 41fed8606..6b23a8ebd 100644 --- a/src/spicelib/parser/ptfuncs.c +++ b/src/spicelib/parser/ptfuncs.c @@ -248,7 +248,7 @@ PTln(double arg) double PTlog(double arg) { - if (arg <= 0.0) + if (arg < 0.0) return (HUGE); return (log10(arg)); }