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

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
主站蜘蛛池模板: 景谷| 道孚县| 通城县| 阆中市| 泾川县| 定襄县| 藁城市| 沿河| 个旧市| 霍邱县| 凤山市| 陆良县| 克什克腾旗| 宜昌市| 沂水县| 天津市| 房产| 清涧县| 慈利县| 铁力市| 临泽县| 祥云县| 万荣县| 怀化市| 兴隆县| 合山市| 镇宁| 襄汾县| 克山县| 怀集县| 阿瓦提县| 临泉县| 夏邑县| 定南县| 庆云县| 连江县| 乡城县| 当阳市| 靖西县| 长沙市| 巫溪县|