官术网_书友最值得收藏!

Calculating the square root of the value

To calculate the square root of the value, call the sqrt method on it:

say 9.sqrt; # 3

The routine is also defined in Perl 6 as a standalone built-in function. Consider the following code snippet:

say sqrt(9); # 3

As the sqrt method is inherited from the Numeric role, the result is a floating-point value:

say 10.sqrt; # 3.16227766016838
主站蜘蛛池模板: 遵义市| 沾化县| 阜阳市| 奉新县| 津市市| 建昌县| 阿尔山市| 济阳县| 林甸县| 孟连| 都匀市| 香格里拉县| 蚌埠市| 沙湾县| 乐安县| 毕节市| 上犹县| 盐津县| 泰顺县| 镇远县| 客服| 老河口市| 汉川市| 黔东| 潜山县| 昭觉县| 东安县| 平昌县| 万山特区| 措美县| 乐安县| 恩平市| 酉阳| 三亚市| 元江| 莎车县| 天水市| 城步| 盐山县| 晋中市| 敦煌市|