chen3feng / stl4go

Generic Container and Algorithm Library for Go
Apache License 2.0
315 stars 49 forks source link

fix the numeric truncation problem of SumAs function #112

Closed wjiec closed 1 year ago

wjiec commented 1 year ago

R(v) causes precision loss when a float array is passed and needs to return an integer.

for example: SumAs[int64]([]float64{0.1, 0.2, 0.3, 0.4})

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3852001786


Totals Coverage Status
Change from base Build 3099463024: 0.0%
Covered Lines: 1779
Relevant Lines: 1779

💛 - Coveralls
chen3feng commented 1 year ago

Many thanks