Fixed #23770 -- Changed serialization strategy for floats with respect to NaN and Inf

Thanks to w0rp for the report
But now the imports aren't alphabetized anymore... :)