According to the Ion specification: http://amzn.github.io/ion-docs/docs/float.html, it's always valid to store a float as an float64, but if it fits in an float32 then that's an option too. This change checks to see if a float can be losslessly represented as a float32 and does so.
Originally this was part of the Marshal tests, but this fix can be its own PR.
According to the Ion specification: http://amzn.github.io/ion-docs/docs/float.html, it's always valid to store a float as an float64, but if it fits in an float32 then that's an option too. This change checks to see if a float can be losslessly represented as a float32 and does so.
Originally this was part of the Marshal tests, but this fix can be its own PR.