fix the problem of floating point accuracy