https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100174

--- Comment #2 from LinoPeng <608410104 at alum dot ccu.edu.tw> ---
Hi Andrew Pinski,

I am new here. I am sorry if I had offended you.

Float a = 0.3333. It 23 fraction bits is "01010101010011001001100".
I trace gcc-9.2.0 source code from real.c. I founded sig[SIGSZ-1] would be
clear another 41 bits to zero (sig[SIGSZ-1] have 64bits -> 64 - 23 = 41). Also
double too.
Before clear sig[SIGSZ-1] = 01010101 01001100 10011000 01011111 00000110
11110110 10010100 0100011 
After clear sig[SIGSZ-1] = 01010101 01001100 10011000 00000000 00000000
00000000 00000000 0000000
As below statement that is real.c source code. r is const REAL_VALUE_TYPE.
"sig = (r->sig[SIGSZ-1] >> (HOST_BITS_PER_LONG - 24)) & 0x7fffff;"
I mean's why not just truncated 23 bits in sig[SIGSZ-1]. Do or do not using the
function "clear_significand_below" it do not effect sig record fraction bit.

Reply via email to