problom : 'f1' value hava been changed when output. reason : the binary repersentation of 2.2f is : 00110011001100110011... (is an infinite recurring decimal) but computer only store 24 byte , so discard the remaining number , lead to the value has b
原文地址:https://www.2cto.com/database/201111/111983.html 原文内容如下: Mysql where 语句中有float 类型数据判断相等时,检索不出记录. mysql 对像这种 SELECT RecordTime FROM test WHERE ziduan=98.1 是检索不到记录的,百度了下,查到原因是浮点值在电脑存放为10.27999973297119140625 这种形式.听高手讲是:因为10进制和2进制之间的误差.看样子误差也在第七位出