We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed9a77f commit 30649faCopy full SHA for 30649fa
1 file changed
ext/stats/kahan.go
@@ -5,15 +5,15 @@ package stats
5
type kahan struct{ hi, lo float64 }
6
7
func (k *kahan) add(x float64) {
8
- y := k.lo + x
9
- t := k.hi + y
10
- k.lo = y - (t - k.hi)
+ y := float64(k.lo + x)
+ t := float64(k.hi + y)
+ k.lo = y - float64(t-k.hi)
11
k.hi = t
12
}
13
14
func (k *kahan) sub(x float64) {
15
- y := k.lo - x
16
17
+ y := float64(k.lo - x)
18
19
0 commit comments