# Fractional numbersΒΆ

The type of *fractional numbers* is written `F`

, `π½`

, `Frac`

, or
`Fractional`

. The fractional numbers include all the natural
numbers (0, 1, 2, β¦) along with all the positive fractions formed
from the ratio of two natural numbers (such as 1/2, 13/7, 56/57, β¦)

Adding, multiplying, or dividing two fractional numbers yields another fractional number. Trying to subtract two fractional numbers will automatically convert the result to a rational number:

```
Disco> :type (1/2) * (2/3)
1 / 2 * 2 / 3 : π½
Disco> :type 1/2 - 2/3
1 / 2 - 2 / 3 : β
```

The special sets β (natural numbers), β€ (integers), and β (rational numbers) are very common in mathematics and computer science, but the set of fractional numbers π½ is not common at all (in fact, I made up the name and the notation). People usually start with the natural numbers β, extend them with subtraction to get the integers β€, and then extend those again with division to get the rational numbers β. However, there is no reason at all that we canβt do it in the other order: first extend the natural numbers β with division to get the fractional numbers π½, then extend with subtraction to get β. Having all four types in Disco (even though one of them is not very common in mathematical practice) makes many things simpler and more elegant.