On Sun, 9 Jun 2019, Tejas Joshi wrote:

> Hello.
> I have created another patch which addresses the above points,
> attached herewith.

I don't think you should have the unreachable "return false;" in is_even.  
The last "else if" can just be "else".

> > a conditional with < not <=; if REAL_EXP (r) == SIGNIFICAND_BITS, the
> > least significant bit has value 1 and the number must be an integer).
> 
> The number is integer because of the whole word spaces is occupied by
> integer part?
> Also, why would the least significant bit will have value 1 if
> REAL_EXP (r) == SIGNIFICAND_BITS, as it only concerns with 2^0th
> position (even or odd)?

My understanding is that the significand is, as per the comments in 
real.c, in the range [0.5, 1.0).  There are SIGNIFICAND_BITS bits.  The 
bit above the most significant one has value 2^REAL_EXP.  The most 
significant one has value 2^(REAL_EXP-1).  The least significant one has 
value 2^(REAL_EXP-SIGNIFICAND_BITS).  If REAL_EXP == SIGNIFICAND_BITS, 
that means the least significant bit has value 2^0 = 1, and there are no 
bits with value 0.5 or below, so the number is an integer.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to