Now when my calculator is working in radians st is evaluated to 97% which is the value I'm after. When working in degrees it is approx -75% which is wrong. In Netbeans st is -75% like the wrong calculator value. How can I get 97% in Netbeans using the above formula?
I'm pretty sure the standard(?) has all the trigonomic functions using radians. However, if need be, you can convert from radians to degrees and vice versa:
/* sin example */
#include <stdio.h> /* printf */
#include <math.h> /* sin */
#define PI 3.14159265
int main ()
{
double param, result;
param = 30.0;
result = sin (param*PI/180);
printf ("The sine of %f degrees is %f.\n", param, result );
return 0;
}
Using pi/180 instead of 360 in your example gave me a result of 96.1262.