Jump to content
  • Advertisement
Sign in to follow this  
ongamex92

sinf and and libm on msc

This topic is 1552 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

after compiling 

float x = sinf(y);//y is a float result is the same if i use std::sin

The output dissasembly for msvc is: 

00B61018  push        esi  
00B61019  call        __libm_sse2_sin_precise (0B6192Ah)  
00B6101E  cvtsd2ss    xmm0,xmm0  
00B61022  movss       dword ptr [ebp-38h],xmm0  

Well I'm using floats and it is calling double precision sin(). Compiling the same code with gcc calls "..libm_sincosf". 

Why MS aren't calling single precision equivalents? How can i fix this?

Share this post


Link to post
Share on other sites
Advertisement

Why isn't MS using single precision? I'm not sure. Personally, I don't think its that big a deal. If you don't want it to do the double precision routine you could try using the LibM library AMD. I'm not sure how it will cooperate with the built in sinf when it comes to linking the program.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!