
17 Jan
2025
17 Jan
'25
9:31 p.m.
Christopher Kormanyos wrote:
Question: I've noticed that this:
1.23456789098787237982792742932938492382342382342002934932_d f
Compiles, although it truncates the> value to 1.234568. Would it make> sense to somehow tell the user "hey,> this literal is too long" It would absolutely make sense, butthen you would need the same thing tohappen for float, double and longdouble in the Standard, which isn'tgoing to happen. So Decimal follows suit.
That's not the same. Base 2 floats don't need a fixed number of decimal digits to be represented unambiguously, but decimal floats do.