Optimal literal representation of integers and floats

Yes.

Here’s how you do it in C/C++: https://en.cppreference.com/w/cpp/language/floating_literal

I believe most languages have support for hexadecimal float representations these days. Note that you cannot write infinity/NaN using this notation, but all other representable floats have an unambiguous and exact representation using this syntax.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top