Generalize stats from f64 to the Float trait