它给出的值是 557135813.94455。值(value)每次都会保持不变吗?为什么它不显示无穷大??
#include <stdio.h>
#include <math.h>
#define PI 3.14159265
int main ()
{
double param, result;
param = 90.0;
result = tan ( param * PI / 180.0 );
printf ("The tangent of %f degrees is %f.\n", param, result );
return 0;
}
最佳答案
您传递的不是 Pi/2 的值,而是 90.0 * 3.14159265/180.0,一个近似值。
关于c - c中tan(90)的值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31522644/