// float
if(abs(x) < 1e-7){
printf("yes");
}
// double
if(abs(x) < 1e-15){
printf("yes");
}
C语言使用If判断浮点数是否等于0
猜你喜欢
转载自blog.csdn.net/weixin_43826242/article/details/98529453
今日推荐
周排行