function sin() and tan() return wrong values

so i include math.h inorder to get sin and tan functions
so i use them in my code but i figured out that those functions don't return accurate values. i dont really care if they are unaccurate by like 0.1% and stuff like that but this functions return very unaccurate values. lets say i have this code:

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
cout << tan(5) << " , " << sin(30) << endl;
return 0;
}

so my program outputs this:( -3.38052 , -0.988032).
what its supose to output is this( 0.08748 , 0.5).
i suspect that floating points are never accurate and you need to read a whole article do understand how they work.I don't have strength to do that all i want is to use the sin and tan functions.is there some sort of library that returns more accurate values?
Read the documentation. The input value is in radians.
thanks
Topic archived. No new replies allowed.