trignometric inverse problem

IT shows problem for acos etc but y it says it cant convert double into binary but its in double help please !!!!!!

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
 #include<iostream>
#include<conio.h>
#include<math.h>
#define PI 3.14
using namespace std;
int main()
{
  double cos1, result;
  cos1 = 60.0;
  result = cos ( cos1 * PI / 180.0 );
cout<<"COS 60:"<<result<<endl;
double sin1 ;
sin1= 60.0;
result= sin (sin1*PI/180.0);
cout<<"SIN 60 :"<<result<<endl;
double tan1=60.0;
result=tan(tan1*PI/180.0);
cout<<"TAN 60  :"<<result<<endl;
double acos1=.5;
 result=acos*(acos1)*180/PI;
cout<<"ACOS .5 :"<<result<<endl;
double asin1=.5;
result=asin*(asin1)*180/PI;
cout<<"ASIN1 .5 :"<<result<<endl;
double atan1=.5;
result=atan*(atan1)*180/PI;
cout<<"ATAN1 .5 :"<<result<<endl;

}
1
2
result=tan(tan1*PI/180.0);
result=acos*(acos1)*180/PI;
Why such difference
tan is for normal tangent and acos is for inverse cosine
But why does one have an intervening '*' symbol,but not the other?
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
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
The answers for asin and atan should be 60 and 60 but they are 30 and 26.5
i am sorry u are right i must be wrong than isnt asin equal inverse of sin or sin-1 sign in calculator
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.
oh yes sorry thanks for helping
Topic archived. No new replies allowed.