Look at the example at the end, you can change the type where it has int.
The amount of significant figures these types can have is important.
float has 5 or 6 sf, while double has 15 or 16, so that is why it is the default and preferred type. Unless you are using some library which requires float, use double.