From 0825c10471580d73fbff924963baad43ad5830ef Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 18 Aug 2012 17:10:06 +0200 Subject: [PATCH] bug fix, print complex yet real valued frequency when printing a complex frequency vector, yet with real value some left over nonsens was printed instead of the actual real value. this bug was introduced in commit: Date: Thu Jan 15 21:08:09 2009 +0000 Improvements in vector derivative computation and new functions to compute group delay and moving average. From espice (A. Roldan). --- src/frontend/postcoms.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/frontend/postcoms.c b/src/frontend/postcoms.c index 31f08c5ce..033aa620a 100644 --- a/src/frontend/postcoms.c +++ b/src/frontend/postcoms.c @@ -335,13 +335,11 @@ loop: else { /* In case of a single frequency and have a real part avoids print imaginary part equals 0. */ - if(eq(v->v_name, "frequency")) + if(eq(v->v_name, "frequency") && + imagpart(v->v_compdata[j]) == 0.0) { - if(imagpart(v->v_compdata[j])==0.0) - { printnum(numbuf, realpart(v->v_compdata[j])); (void) sprintf(out_pbuf, "%s\t",numbuf); - } } else {