cbor-wg / draft-ietf-cbor-cde

Internet-Drafts on CBOR Deterministic Encoding
Other
0 stars 2 forks source link

additional information in integers vs doubles #4

Open dwaite opened 9 months ago

dwaite commented 9 months ago

In the section on reducing floating point numbers to integers, I believe it would be appropriate to clearly specify behavior of other floating point reductions, e.g. reducing 0.5 from double to a half-width float.

In addition, I believe the behavior needs to be defined as to what an application should do when conversion of an integer to a floating point number is in itself lossy, e.g. what to do if an application expects a double but the CBOR value received is the decimal 9007199254740993. Silent truncation would make the round-trip non-deterministic.

hildjj commented 7 months ago

See the section on preferred serialization in RFC8949, and read the dCBOR draft, then see what else this spec needs?