#include<stdio.h>
#include<math.h>
#define PI 2*acos(0.0)
int main(void)
{
double theta;
theta=tanh(1/(sqrt(3.0)));
printf("With tanh function = %lf\n",theta);
printf("Actual value = %lf\n",PI/6.0);
return 0;
}
Output:
With tanh function = 0.520737
Actual value = 0.523599
Why are these two values different? It should me same as my understanding.