Skip to content
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

修复浮点数排序 #1265

Merged
merged 5 commits into from
Jun 2, 2021
Merged

修复浮点数排序 #1265

merged 5 commits into from
Jun 2, 2021

Conversation

weicut
Copy link

@weicut weicut commented May 25, 2021

原因:
返回值,强制转成 int 类型,会导致浮点数比较不准确,例如:0.33,转成 int 类型时,会变成 0

fangjw added 2 commits May 25, 2021 16:10
原因:
返回值,强制转成 int 类型,会导致浮点型比较不准确,例如:0.33,转成 int 类型时,会变成 0
原因:
返回值,强制转成 int 类型,会导致浮点型比较不准确,例如:0.33,转成 int 类型时,会变成 0
@codecov-commenter
Copy link

codecov-commenter commented May 25, 2021

Codecov Report

Merging #1265 (ee3d375) into master (1c09846) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1265   +/-   ##
=======================================
  Coverage   69.08%   69.09%           
=======================================
  Files         374      374           
  Lines       26525    26537   +12     
=======================================
+ Hits        18326    18335    +9     
- Misses       6660     6662    +2     
- Partials     1539     1540    +1     
Impacted Files Coverage Δ
util/gutil/gutil_comparator.go 100.00% <100.00%> (ø)
os/gmutex/gmutex.go 94.59% <0.00%> (-2.71%) ⬇️
container/gtree/gtree_btree.go 88.16% <0.00%> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c09846...ee3d375. Read the comment docs.

@gqcn
Copy link
Member

gqcn commented Jun 1, 2021

@weicut 感谢贡献,麻烦增加一下该针对你修改的场景的单元测试呢。

@weicut weicut changed the title 修复浮点型排序 修复浮点数排序 Jun 2, 2021
@weicut
Copy link
Author

weicut commented Jun 2, 2021

@weicut 感谢贡献,麻烦增加一下该针对你修改的场景的单元测试呢。

已补充单元测试

@gqcn gqcn merged commit 2d8ab72 into gogf:master Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants