MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkCos

Function BenchmarkCos

math/cos_test.go:35–39  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

33}
34
35func BenchmarkCos(b *testing.B) {
36 for i := 0; i < b.N; i++ {
37 algmath.Cos(180)
38 }
39}
40
41// BenchmarkMathCos is slower because the standard library `math.Cos` calculates a more accurate value.
42func BenchmarkMathCos(b *testing.B) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected