Re: feature or a bug with long double (quad-precision) in gcc (6.2.1)

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

 



On 2016-12-08 10:28:17 +0100, Mason wrote:
> On 06/12/2016 12:39, Vincent Lefevre wrote:
> 
> > So, in C, long double = x86 extended precision (80 bits + padding).
> 
> That statement is incorrect.

It is correct, but you should have taken the context into account
(which I had quoted): "I faced strange problem with long double (C)
in comparison with fortran (gfortran) on my system: Archlinux x86_64,
gcc 6.2.1 20160830."

So, what I said was for *this* system, and "in C" should have been
read as "as opposition to Fortran" (not in C in general). Sorry if
this wasn't clear.

> More specifically,
> [C99] 5.2.4.2.2 Characteristics of floating types <float.h>
> 
> Smallest valid values for
> 
> DBL_DIG = LDBL_DIG = 10
> DBL_MAX = LDBL_MAX = 1E+37
> DBL_EPSILON = LDBL_EPSILON = 1E-9
> 
> In other words, the C standard allows "long double" to be strictly
> equivalent to "double". (I don't think that changed in C11.)

Yes, and my message contained a link to the Wikipedia article on
"long double", giving what one can find in practice on various
platforms.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



[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