Thank you Stephen Heumann, That statement jogs a memory.
Here's the VanillaC source.
printf("\ntype 16 point input vector\n");
scanf("%f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f",&data[0],&data[1],&data[2],&data[3],&data[4],&data[5],&data[6],&data[7],&data[8],&data[9],&data[10],&data[11],&data[12],&data[13],&data[14],&data[15]);
R16SRFFT(data,output);
printf("\nresult is:\n");
printf("k,\t\tReal Part\t\tImaginary Part\n");
printf("0\t\t%.9f\t\t%.9f\n",output[0],zero);
printf("1\t\t%.9f\t\t%.9f\n",output[1],output[9]);
printf("2\t\t%.9f\t\t%.9f\n",output[2],output[10]);
printf("3\t\t%.9f\t\t%.9f\n",output[3],output[11]);
printf("4\t\t%.9f\t\t%.9f\n",output[4],output[12]);
printf("5\t\t%.9f\t\t%.9f\n",output[5],output[13]);
printf("6\t\t%.9f\t\t%.9f\n",output[6],output[14]);
printf("7\t\t%.9f\t\t%.9f\n",output[7],output[15]);
printf("8\t\t%.9f\t\t%.9f\n",output[8],zero);
printf("9\t\t%.9f\t\t%.9f\n",output[7],-output[15]);
printf("10\t\t%.9f\t\t%.9f\n",output[6],-output[14]);
printf("11\t\t%.9f\t\t%.9f\n",output[5],-output[13]);
printf("12\t\t%.9f\t\t%.9f\n",output[4],-output[12]);
printf("13\t\t%.9f\t\t%.9f\n",output[3],-output[11]);
printf("14\t\t%.9f\t\t%.9f\n",output[2],-output[9]);
printf("15\t\t%.9f\t\t%.9f\n",output[1],-output[8]);
}
Here is what i am expecting for output.
result is:
k, Real Part Imaginary Part
0 -2.749192238 0.000000000
1 1.549032927 1.325549364
2 -0.874582291 1.874609947
3 4.200131416 1.325549364
4 1.000027657 0.000000000
5 4.200131416 -1.325549364
6 -0.874582291 -1.874609947
7 1.549032927 -1.325549364
8 -2.749192238 0.000000000
9 1.549032927 1.325549364
10 -0.874582291 1.874609947
11 4.200131416 1.325549364
12 1.000027657 -0.000000000
13 4.200131416 -1.325549364
14 -0.874582291 -1.325549364
15 1.549032927 2.749192238
Here is what Orca/C gives you.
result is:
k,Real PartImaginary Part
08.00000000000000000000.0000000000000000000
11.0000000000000000000-5.0273394584655761719
20.0000000000000000000-0.0000000000000000000
31.0000000000000000000-1.4966056346893310547
40.00000000000000000000.0000000000000000000
51.0000000000000000000-0.6681787967681884766
60.00000000000000000000.0000000000000000000
70.9999999403953552246-0.1989121437072753906
80.00000000000000000000.0000000000000000000
90.99999994039535522460.1989121437072753906
100.0000000000000000000-0.0000000000000000000
111.00000000000000000000.6681787967681884766
120.0000000000000000000-0.0000000000000000000
131.00000000000000000001.4966056346893310547
140.00000000000000000005.0273394584655761719
151.0000000000000000000-0.0000000000000000000
When you replace the \t with 4 spaces for each occurrence of TAB, the - symbol on negative numbers do not line up.
When you add extra space to line the values up, any change to the input values change the output values and again things do not line up again.
My change, is to the float output from 9 to 19 decimal places. You can see in the Orca/C output the Positive Value Whole Number is where the Negative Symbol shows up when Negative Numbers are the output result. Also you can see that the decimal points do not line up.
Question: How do i line up the positive and negative first digits as well as the decimal points.
thank you all for the input.
James