- Perl 6 Deep Dive
- Andrew Shitov
- 51字
- 2021-07-03 00:05:51
Getting the numerator and denominator
To get the two parts of a Rat value, use the numerator and denominator methods. Let's take a look at how they work on the example of the value from the previous section:
my $x = 10/3;
say $x.numerator; # 10
say $x.denominator; # 3
推薦閱讀
- CMDB分步構(gòu)建指南
- Flink SQL與DataStream入門(mén)、進(jìn)階與實(shí)戰(zhàn)
- jQuery從入門(mén)到精通 (軟件開(kāi)發(fā)視頻大講堂)
- Quantum Computing and Blockchain in Business
- Statistical Application Development with R and Python(Second Edition)
- R Data Science Essentials
- HTML5+CSS3+JavaScript 從入門(mén)到項(xiàng)目實(shí)踐(超值版)
- ASP.NET求職寶典
- 深入解析Java編譯器:源碼剖析與實(shí)例詳解
- Java EE 7 with GlassFish 4 Application Server
- Learning Image Processing with OpenCV
- 計(jì)算語(yǔ)言學(xué)導(dǎo)論
- 交互設(shè)計(jì)師成長(zhǎng)手冊(cè):從零開(kāi)始學(xué)交互
- Java Web開(kāi)發(fā)教程:基于Struts2+Hibernate+Spring
- 零基礎(chǔ)C語(yǔ)言學(xué)習(xí)筆記