mborgerding/kissfft

HALF_OF multiplies by a double 0.5

JulienMaille opened this issue · 3 comments

When compiling with msvc 2013 I get this warning:

warning C4244: '=' : conversion from 'double' to 'float', possible loss of data

It looks like a bright mind figured this out before I did. credits to him!
steffen-kiess@a10e9c4

That approach seems like overkill. I also think it kinda smells funny to use the preprocessor
-Dkiss_fft_suffix=f considering the data type is already defined.

Wouldn't this work?

- #  define HALF_OF(x) ((x)*.5)
+ #  define HALF_OF(x) ((x)*((kiss_fft_scalar).5))

Yes, that will get rid of the warning!

I think you can commit the "fix" you suggested just above!