3,881
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <math.h>
#include <float.h>
int main() {
double d;
d=tan(asin(sqrt(2.0)/2.0))-1.0;
printf("tan(arcsin(sqrt(2.0)/2.0))-1.0=%3.1lf\n",d);
if (fabs(d)<DBL_EPSILON) {
printf("OK.\n");
} else {
printf("Error!\n");
}
return 0;
}
//tan(arcsin(sqrt(2.0)/2.0))-1.0=0.0
//OK.