prost-reflect icon indicating copy to clipboard operation
prost-reflect copied to clipboard

Floating point values do not round-trip exactly

Open andrew-otiv opened this issue 5 months ago • 1 comments

Floating point values are not round-tripping through JSON without precision loss... this is the one I hit (deep in a datastructure while "fuzzing"):

-4.4737164812014446e192 -4.473716481201445e192

Most use cases probably don't care, but it would make testing easier to not have edge cases that don't quite round trip. I thought the standard library's printers round-tripped...

Maybe this is something that can be configured to be stricter in serde?

Thanks for the free library!

andrew-otiv avatar Sep 17 '24 08:09 andrew-otiv