Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable fused multiply-subtract optimizations on activator calculatio…
…ns (#8341) Fixes TestAutoscalerPanicModeExponentialTrackAndStablize on arm64, ppc64le and s390x. While we are here make the order of operations match between the expectedECB and excessBCF calculations. Floating point operations aren't associative so performing them in the same order reduces the risk of unexpected differences. Background: On some platforms (not amd64 - unless using a compiler other than gc) the Go compiler 'fuses' some floating point operations. This improves performance and sometimes accuracy. However this can cause issues with test data that has been generated on a platform without such fused operations (such as amd64) or has been constant folded. A simplified example of the problem (values changed): Without fused multiply-subtract: 1.333... * 3 - 2 = 2.000... With fused multiply-subtract: 1.333... * 3 - 2 = 1.999... This commit disables fused multiply-subtract operations in all excess burst capacity calculations. This ensures that the calculations match across all platforms and in situations where constant folding takes place.
- Loading branch information