float类型有效精度只有7位,所以尽量用double。 可以参考下面这个地址,有详细的介绍 https://blog.csdn.net/albertsh/article/details/92385277