rendergather / osgocean

Automatically exported from code.google.com/p/osgocean
GNU Lesser General Public License v3.0
0 stars 0 forks source link

sqrt() vs sqrtf() #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

When i build svn on my 64 bits archlinux box i get this build error :

FFTSimulation.cpp: In member function ‘void 
osgOcean::FFTSimulation::Implementation::computeBaseAmplitudes()’:
FFTSimulation.cpp:266: erreur: no match for ‘operator*’ in 
‘std::complex<float>(real, imag) * 
sqrt((((double)osgOcean::FFTSimulation::Implementation::phillipsSpectrum(((
const osg::Vec2f&)((const osg::Vec2f*)(& K))))) * 5.0e-1))’
make[2]: *** [src/osgOcean/CMakeFiles/osgOcean.dir/FFTSimulation.cpp.o] 
Erreur 1
make[1]: *** [src/osgOcean/CMakeFiles/osgOcean.dir/all] Erreur 2
make: *** [all] Erreur 2

replace sqrt by sqrtf solve the issue.

Original issue reported on code.google.com by linares....@gmail.com on 26 Feb 2010 at 6:43

GoogleCodeExporter commented 9 years ago
Same problem here with ubuntu 9.10 64bit. The sqrtf workaround also worked for 
me.

Original comment by ruben....@gmail.com on 28 Feb 2010 at 8:58

GoogleCodeExporter commented 9 years ago
Hi guys,

Thanks for flagging this. I've added an ifdef around that so that it uses sqrtf 
for 
cases where the FFTWF library is used and checked it into the trunk. 

Would you be so kind as to test this for me? I don't have a 64bit system.

Cheers.

Kim.

Original comment by kcb...@googlemail.com on 3 Mar 2010 at 11:15

GoogleCodeExporter commented 9 years ago
hi,

Yes, it's ok, both with FFTW and FFTWF.
i love your: typedef std::complex<fftw_data_type> complex; 

thanks.

Anto

Original comment by linares....@gmail.com on 7 Mar 2010 at 12:40

GoogleCodeExporter commented 9 years ago

Original comment by kcb...@googlemail.com on 18 May 2010 at 8:11

GoogleCodeExporter commented 9 years ago
same bug on Ubuntu 10 using FFTWF official package. sqrtf fix. Thanks. 

Original comment by skaiw...@gmail.com on 9 Aug 2011 at 7:07