Comment

Comment by ufo

I'm not sure, but generally speaking converting doubles to strings will fail to round trip at least the NaNs

If round tripping is important, my recommendation would be to output something that directly corresponds to the binary representation of the float. For example, printf %a

parent ufo 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton