Oct 7, 2013 at 1:38pm UTC
tan is for normal tangent and acos is for inverse cosine
Oct 7, 2013 at 1:49pm UTC
But why does one have an intervening '* ' symbol,but not the other?
Oct 7, 2013 at 2:10pm UTC
yes both of u were right i dont why multiply sign should have such an affect but still the inverse thing all of them show a wrong answer now how to solve this
Oct 7, 2013 at 2:32pm UTC
The answers seem correct to me (except they are approximate, due to the value of PI used).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#include <iostream>
#include <cmath>
const double PI = 3.1415926535897932385;
using namespace std;
int main()
{
double result;
double angle = 60.0;
result = cos(angle*PI/180.0);
cout << "COS " << angle << " : " << result << endl;
result = sin(angle*PI/180.0);
cout << "SIN " << angle << " : " << result << endl;
result = tan(angle*PI/180.0);
cout << "TAN " << angle << " : " << result << endl;
double value = 0.5;
result = acos(value)*180/PI;
cout <<"ACOS " << value << " : " << result << endl;
result = asin(value)*180/PI;
cout <<"ASIN " << value << " : " << result << endl;
result = atan(value)*180/PI;
cout << "ATAN " << value << " : " << result << endl;
}
Last edited on Oct 7, 2013 at 2:32pm UTC
Oct 7, 2013 at 2:45pm UTC
The answers for asin and atan should be 60 and 60 but they are 30 and 26.5
Oct 7, 2013 at 3:33pm UTC
i am sorry u are right i must be wrong than isnt asin equal inverse of sin or sin-1 sign in calculator
Oct 7, 2013 at 3:43pm UTC
You used 0.5 in all three of asin, acos and atan. But you should have used 0.5, 0.866025 and 1.73205 respectively.
Oct 7, 2013 at 3:57pm UTC
oh yes sorry thanks for helping