Hi

Am 2025-07-28 15:00, schrieb Alexandre Daubois:
is_representable_as_float(2**53);     // false, precision loss when
casted to float

Similarly to my other email: This is false. 2**53 is exactly representable as float. Every power of two (<= 1024) is.

is_representable_as_float("1e308");   // true

This is false. 1e308 is not exactly representable. The nearest representable value is 1.00000000000000001098e+308: https://float.exposed/0x7fe1ccf385ebc8a0

Best regards
Tim Düsterhus

Reply via email to