diff --git a/src/math/example_test.go b/src/math/example_test.go index feaf9d825255521d0d6e405bee584509747c32cc..a1f764bcdaabcba7b9aed385bbe4c4f9947b242b 100644 --- a/src/math/example_test.go +++ b/src/math/example_test.go @@ -89,3 +89,27 @@ func ExampleSqrt() { fmt.Printf("%.1f", c) // Output: 5.0 } + +func ExampleCeil() { + c := math.Ceil(1.49) + fmt.Printf("%.1f", c) + // Output: 2.0 +} + +func ExampleFloor() { + c := math.Floor(1.51) + fmt.Printf("%.1f", c) + // Output: 1.0 +} + +func ExamplePow() { + c := math.Pow(2, 3) + fmt.Printf("%.1f", c) + // Output: 8.0 +} + +func ExamplePow10() { + c := math.Pow10(2) + fmt.Printf("%.1f", c) + // Output: 100.0 +}