-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql中float精度计算误差容忍度太低 #296
Labels
enhancement
New feature or request
Comments
按照网上的建议,在MySQL中都使用 DECIMAL(15,2)这种或者类似的写法,可以在miniob中把float替换掉,写一个支持默认的decimal, 小数长度固定的浮点数 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Enhancement
MySQL中对float类型的数据计算总是出现让人无法接受的误差。
样例1:
比如在表中执行:
insert into t values(29.14);
select * from t where id < 29.14;
将会看到29.14这条数据。
样例2:
插入稍微大一点的数字,比如10365.23,MySQL中查询数据时会得到10365.2
The text was updated successfully, but these errors were encountered: