math - sin v/s sinf function in C -


I am trying to use the sinf function in my C program but it will give me a Undefined reference gives error under MSVC 6.0, however sin works fine.

It makes me eager to find the difference between sin and sinf sin and sinf What is the logical difference between

I have my own sinf functionality?

Sin takes a double and a double- sinf < / Code> takes a float and gives a float.

In other words, sin is double correct and sinf is an accurate

if you are using an old compiler If sinf is not there you can apply it to:

#define sinf (x) (float) sin ((double) (x))

< / Div>

Comments