aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/math/example_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/math/example_test.go b/src/math/example_test.go
index 50c7426979..ce9c383256 100644
--- a/src/math/example_test.go
+++ b/src/math/example_test.go
@@ -219,3 +219,11 @@ func ExampleTrunc() {
// 3.00
// -1.00
}
+
+func ExampleCbrt() {
+ fmt.Printf("%.2f\n", math.Cbrt(8))
+ fmt.Printf("%.2f\n", math.Cbrt(27))
+ // Output:
+ // 2.00
+ // 3.00
+}