in reply to Re: Rounding off ?
in thread Rounding off ?

printf("%" PRIx64 "\n", (uint64_t)(double)0x3243bcfe21ef4468ULL);

Nice explanation - thanks.
The integer values being output for the OP appeared to be 54-bit precision, and that threw me somewhat.
But I was excluding only the trailing zero bits from the precision count, while I should also have been excluding the leading zero bits.

It all makes sense now ... for some definition of "makes sense" ;-)

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: Rounding off ?
by Anonymous Monk on Sep 15, 2018 at 19:25 UTC
    Actually, it was your reply that triggered something in my head ("hmm, isn't it doubles that contain fifty something bits of the fraction?") and made me investigate.