mantech
asked on
sin, cos & tan function
I found that these function doesn't use degree to get the value. e.g
SELECT sin(45) from dual;
If 45 is degree, the result should be 0.7071. But Oracle respond 0.525321989 as the result.
So, my question in this case, 45 define as what? and how to convert this data type to degree?
SELECT sin(45) from dual;
If 45 is degree, the result should be 0.7071. But Oracle respond 0.525321989 as the result.
So, my question in this case, 45 define as what? and how to convert this data type to degree?
My Friend,
in every trigonometric function IN THE PROGRAMMING LANGUAGES the argument has to be in "RADIANS", NOT IN GRADES.
So the 45 grades are Pi/4= 3.14/4 = 0.785
The reason for that is the fact that in the programming languages the appropriate subprogram uses a Taylor sum to calculate the function. And the Taylor sums work with radians only.
in every trigonometric function IN THE PROGRAMMING LANGUAGES the argument has to be in "RADIANS", NOT IN GRADES.
So the 45 grades are Pi/4= 3.14/4 = 0.785
The reason for that is the fact that in the programming languages the appropriate subprogram uses a Taylor sum to calculate the function. And the Taylor sums work with radians only.
The angles are in radians not in degrees
90 = pi/4 = 3.14/4
90 = pi/4 = 3.14/4
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SELECT SIN(45 * 3.14159265359/180) FROM DUAL;
Hth.