Debian Codegraph @

compiler/natives/src/math/math_test.go

raw
1 // +build js
2
3 package math_test
4
5 // Slighly higher tolerances than upstream, otherwise TestGamma fails.
6 // TODO: Is there a better way to fix TestGamma? It's weird that only one test
7 // requires increasing tolerances. Perhaps there's a better fix? Maybe we
8 // should override TestGamma specifically and not the package-wide tolerances,
9 // because this will cause many other tests to be less accurate. Or maybe this
10 // is fine?
11 func close(a, b float64) bool { return tolerance(a, b, 4e-14) }
12 func veryclose(a, b float64) bool { return tolerance(a, b, 6e-15) }