Course of Raku / Essentials / Variables and data types essentials / Numbers / Rational numbers

Quiz: Rational numbers in Raku

Select the numbers which are Rat in Raku.

13/64This is a Rat number, not a division of two integers.
1
12.718281828459045That‘s an approximate value of the Euler constant, but this is a Rat still, as it is not infinitely long.
110_230/50_245You can use the _ separator here too.
110.345_678And here.
010.345,678A comma here is neither a decimal comma nor a separator.
1<33/44>Another form of writing rational numbers in Raku.
0<33 44>This is a list of strings (we’ll see it further in the course).
0'<33 44>'This is a string.
1⅞/⅚This is a division of two Rat numbers, but the result is also a Rat number.

Course navigation

Rational numbers   |   Floating-point numbers

Translations of this page: EnglishDeutschEspañolItalianoLatviešuNederlandsБългарскиРусскийУкраїнська