Improved testing for double
Added support for serializing floats