# sinf and and libm on msc

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

## 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 on other sites

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.