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

Function BenchmarkMathCos

math/cos_test.go:42–46  ·  view source on GitHub ↗

BenchmarkMathCos is slower because the standard library `math.Cos` calculates a more accurate value.

(b *testing.B)

Source from the content-addressed store, hash-verified

40
41// BenchmarkMathCos is slower because the standard library `math.Cos` calculates a more accurate value.
42func BenchmarkMathCos(b *testing.B) {
43 for i := 0; i < b.N; i++ {
44 stdmath.Cos(180)
45 }
46}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected