判断两个小数是否相等方法, 不能用等号

bool equal(double a,double b)
{
    if(a-b>-0.00000001&&a-b<0.00000001)return 1;
    else return 0;
}

猜你喜欢

转载自blog.csdn.net/hueru/article/details/80494330
今日推荐