# Juce sin(float) to math.h sin(double)

Hello,
I am quite new in C++ so I am not sure how to do that. But there is in Juce sinus function, and according to Juce documentation it takes and return only float values:
`sin(float value);`

But I want to use double and its precision.

As I know in <math.h> library there is also sinus function that takes and return double values, and have exactly the same syntax:
`sin(double value);`

But in Juce there is automatically included library with sin(float), so if I just:
`#include <math.h>`

Then I am not sure which sinus my code will use. But I want to be sure that all values (argument of sinus and its return) will be with double precision. How to do that?

I know that we can use standard library like that: `std::function...` but I am not sure how to use math.h library. I tried `math.h::sin(double value)` but it doesnâ€™t work.

Of course I know I can use double values in Juce sin function. But I am afraid the returned values will be float.

Your problem is that JUCE client code is all automatically in the `juce::`
namespace, and `math.h`'s functions, being C functions, have no concept of name spacing - to C++, itâ€™s all in the global namespace (along with any definitions made by JUCE).

To be honest, Iâ€™m not sure where JUCE would be defining a sine function, I feel like if it is itâ€™s probably just a `typedef` or an inline pass-through - but thatâ€™s neither here nor there, since you can (and should) use `std::` namespace functions to be absolutely sure. `std::sin(double val)` will always return a `double`, `std::sinf(float val)` will always return a `float`. Use those, theyâ€™re in `<cmath>`.

http://en.cppreference.com/w/cpp/numeric/math/sin

1 Like