method
cbrt
v1_9_3_125 -
Show latest stable
-
0 notes -
Class: Math
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (38)
- 2_2_9 (0)
- 2_4_6 (6)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
cbrt(p1)
public
Returns the cube root of numeric.
-9.upto(9) {|x| p [x, Math.cbrt(x), Math.cbrt(x)**3] } #=> [-9, -2.0800838230519, -9.0] [-8, -2.0, -8.0] [-7, -1.91293118277239, -7.0] [-6, -1.81712059283214, -6.0] [-5, -1.7099759466767, -5.0] [-4, -1.5874010519682, -4.0] [-3, -1.44224957030741, -3.0] [-2, -1.25992104989487, -2.0] [-1, -1.0, -1.0] [0, 0.0, 0.0] [1, 1.0, 1.0] [2, 1.25992104989487, 2.0] [3, 1.44224957030741, 3.0] [4, 1.5874010519682, 4.0] [5, 1.7099759466767, 5.0] [6, 1.81712059283214, 6.0] [7, 1.91293118277239, 7.0] [8, 2.0, 8.0] [9, 2.0800838230519, 9.0]