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).
This commit is contained in:
rlar 2012-08-18 17:10:06 +02:00
parent b02a497490
commit 0825c10471
1 changed files with 2 additions and 4 deletions

View File

@ -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
{