Implement (de)serialization for 16-bit float

Also add tests
Minor: Fix variable naming in macro