[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binary128 - PI and E




On Wed, May 11, 2011 at 10:09 PM, Eric Postpischil <stds-754+ieee.org@edp.org> wrote:
I do not see why the exponent 112 is attractive, though. The exponent will be 1, since π is 1.something * 2**1. The biased exponent encoding will be 1 plus the bias = 1 + 16383 = 16384. And in π * 2**112, the least significant representable bit is 2. I can see how 111 would be attractive, since all the integer bits in π * 2**111 would be representable in the significand of a binary128 object. Unless I slipped by one somewhere?

I agree.
 
16312081666030376401667486162748272 =
110010010000111111011010101000100010000101101000110000100011010011000100110001100110001010001011100000001101110000
 
which is 114 bits.
 
Divide that by 2 to remove the lowest 0 and you get the 113-bit 8156040833015188200833743081374136, making
8156040833015188200833743081374136/2^111 the desired fraction.
 
Rick

--
Check out my blog: http://www.exploringbinary.com

754 | revision | FAQ | references | list archive