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

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
主站蜘蛛池模板: 罗山县| 洛宁县| 永和县| 栾城县| 柳江县| 天镇县| 德江县| 深州市| 昌宁县| 乐平市| 广宗县| 通海县| 亳州市| 黔西| 庆阳市| 安化县| 普格县| 桃园市| 太湖县| 孝感市| 潢川县| 河池市| 石渠县| 基隆市| 二连浩特市| 台湾省| 石柱| 淮南市| 大连市| 潜山县| 景东| 偃师市| 龙游县| 清流县| 金寨县| 永嘉县| 上杭县| 鹤山市| 澄迈县| 绥江县| 宁晋县|