Use float or double type to store data, the loss of precision is a little heavy
Open
@yu285 is already working on this.
Since Jan 8, 2024.
bug
- Dominant language
- C
- Stars
- 25.1k
- Forks
- 5k
- Avg merge
- 4d 59m
- Merged PRs (30d)
- 7
Description
tdengine版本:3.2.2.0
将数据类型设置为float或者double类型的时候,存储电表相关数据存在精度损失,并且对电表电量进行sum时候,结果也有精度损失。
只有将数据类型换成nchar的时候可以解决这个问题,但是会无法sum做计算操作。有没有什么好的方案可以解决这个问题,类似于decimal数据类型或者其他方案进行解决。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.