I can not find the correct value of sin 30 ,
double degrees = 30.0;
double radians = Math.toRadians(degrees);
System.out.println(Math.sin(radians));
which produces .499999999 but the exact value matching to calculator is .5
please help me..
I can not find the correct value of sin 30 ,
double degrees = 30.0;
double radians = Math.toRadians(degrees);
System.out.println(Math.sin(radians));
which produces .499999999 but the exact value matching to calculator is .5
please help me..
Math.sin(..)
make an interpolation to get a good value, therefore you cannot expect to get exact values as result. In addition while interpolating the sin value the problems of float/double arithmetic is an other issue.