I'm successfully using <complex.h> functionality, but I'm a little confused. I'm trying to keep everything in float instead of double and I was uncertain what "I" was, so just to be sure, I defined "If":
then,Code:complex float If;
After doing this and replacing all my I's with If's, nothing worked, all my answers were wrong. Why would that be?Code:If=(float)I;
Also, after switching from double to float, some things got incredibly slow, specifically:
This is really bogged down. I was using "cexpf" which was incredibly slow too, so I tried this just in case.Code:temp+=data[xx]*(cosf(phase[xx])+I*sinf(phase[xx]));
Any ideas?



LinkBack URL
About LinkBacks


