Fix numbers: 5. should be written as 5.0 for recent Scala (>=2.11)

This reworks an initial commit by Valentin Giannini.