The Tempo struct has a wholes_per_min method which calculates how many whole notes per minute there are given a tempo. Since num_beats is cast as f32, this field should just be f32 in the beginning. Additionally, the method relative_to creates a new tempo and quantizes the num_beats back to u16, losing some accuracy in the process.