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

Fwd: Re: Binary128 - PI and E



-------- Original-Nachricht --------
Betreff: Re: Binary128 - PI and E
Datum: Wed, 11 May 2011 23:03:32 +0200
Von: Thorsten Siebenborn <7_born@xxxxxx>
An: William M Klein <wmklein@xxxxxxxxxxxxx>

Am 11.05.2011 21:27, schrieb William M Klein:
This may be a stupid question and I don't know if I am even expre4ssing it 
correct, BUT  Can anyone tell me or point me to some place that documents what 
the exact DECIMAL fixed-point value would be for the most accurate values of PI 
and E that can be stored in a binary128 data item? Would this just be (for PI) 
PI with 35 digits to the right of the decimal point?

The quad-precision format (binary128) has with the implicit hidden bit
113 bit stored which is for pi equivalent to

11.0010010000111111011010101000100010000101101000110000100011010011000100
11000110011000101000101110000000110111000

This is nearly 0,25 ulps lower than the correct value.

The correctly rounded value is
3.1415926535897932384626433832795028

*Exact* conversion binary to decimal (with garbage
digits due to conversion)
3.141592653589793238462643383279502797479068098137295573004504331874296718662975536062731407582759857177734375


Bit equivalent for e:

10.1011011111100001010100010110001010001010111011010010101001101010101111
11011100010101100010000000100111001111010

Nearly 0,49 ulps lower than the correct value.

Correctly rounded value:
2.7182818284590452353602874713526623

*Exact* conversion binary to decimal (with garbage
digits due to conversion)

2.71828182845904523536028747135266231435842186719354886266923086032766716801933881697550532408058643341064453125


Best regards,
Thorsten


754 | revision | FAQ | references | list archive