In julia rational numbers can be constructed with the //
operator.
Lets define two rational numbers, x
and y
:
x = 1//3
1//3
y = 2//5
2//5
When adding x
and y
together we obtain a new rational number:
z = x + y
11//15
This notebook was generated using Literate.jl.