Re: Floating point: just 20 digits of precision

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

 



2010/11/26 Marc Glisse <marc.glisse@xxxxxxxx>:
> On Fri, 26 Nov 2010, Elias Gabriel Amaral da Silva wrote:
>
>> Seems to yield the same precision for long double on both ia32 and
>> amd64 - that is, just 20 digits. This seems too few, looking there:
>>
>> http://en.wikipedia.org/wiki/IEEE_754-2008#Basic_formats
>>
>> Shouldn't I expect at least more than 30 digits, on amd64?
>
> long double would be binary80.
>
>> What is the trick for having 1/7 (or something else) with a precision
>> closer to double's 52 digits?
>
> You seem to be confusing binary digits with decimal digits.

Oh, you are right. 20 decimal digits seems to be roughly equivalent to
64 binary digits (20 * log10/log2 is ~66) one would encounter with
80-bits float.

http://en.wikipedia.org/wiki/Extended_precision

Thank you for your reply :)

I'm cc-ing the one that firstly raised this question too


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux