You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gosuv/vendor/github.com/gopherjs/gopherjs/compiler/natives/src/math/math_test.go

13 lines
587 B

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