Extend the existing tests for `f32` and `f64` with versions that include
`f16`'s new printing and parsing implementations.
Co-authored-by: Speedy_Lex <alex.ciocildau@gmail.com>
A lot of the magic constants can be turned into expressions. This
reduces some code duplication.
Additionally, add traits to make these operations fully generic. This
will make it easier to support `f16` and `f128`.