- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for absDiff (0.78 sec)
-
src/cmd/compile/internal/types2/check_test.go
switch err := err.(type) { case syntax.Error: return err.Pos, err.Msg case Error: return err.Pos, err.Msg default: return nopos, err.Error() } } // absDiff returns the absolute difference between x and y. func absDiff(x, y uint) uint { if x < y { return y - x } return x - y } // parseFlags parses flags from the first line of the given source if the line
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 13.8K bytes - Viewed (0) -
src/go/types/check_test.go
switch err := err.(type) { case *scanner.Error: return err.Pos, err.Msg case Error: return fset.Position(err.Pos), err.Msg } panic("unreachable") } // absDiff returns the absolute difference between x and y. func absDiff(x, y int) int { if x < y { return y - x } return x - y } // parseFlags parses flags from the first line of the given source if the line
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 14.1K bytes - Viewed (0) -
src/math/rand/v2/rand_test.go
stddev float64 closeEnough float64 maxError float64 } func nearEqual(a, b, closeEnough, maxError float64) bool { absDiff := math.Abs(a - b) if absDiff < closeEnough { // Necessary when one value is zero and one value is close to zero. return true } return absDiff/max(math.Abs(a), math.Abs(b)) < maxError } var testSeeds = []uint64{1, 1754801282, 1698661970, 1550503961}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 17.4K bytes - Viewed (0) -
src/math/rand/rand_test.go
stddev float64 closeEnough float64 maxError float64 } func nearEqual(a, b, closeEnough, maxError float64) bool { absDiff := math.Abs(a - b) if absDiff < closeEnough { // Necessary when one value is zero and one value is close to zero. return true } return absDiff/max(math.Abs(a), math.Abs(b)) < maxError } var testSeeds = []int64{1, 1754801282, 1698661970, 1550503961}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.9K bytes - Viewed (0)