mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-05 05:37:10 +02:00
Merge pull request #16895 from bboreham/noinline-kahan
[BUGFIX] PromQL: Noinline kahanSumInc, to reduce numerical errors
This commit is contained in:
commit
e9cf792c47
@ -1188,6 +1188,9 @@ func funcTimestamp(vectorVals []Vector, _ Matrix, _ parser.Expressions, enh *Eva
|
||||
return enh.Out, nil
|
||||
}
|
||||
|
||||
// We get incorrect results if this function is inlined; see https://github.com/prometheus/prometheus/issues/16714.
|
||||
//
|
||||
//go:noinline
|
||||
func kahanSumInc(inc, sum, c float64) (newSum, newC float64) {
|
||||
t := sum + inc
|
||||
switch {
|
||||
|
Loading…
Reference in New Issue
Block a user