Number of significand bits in long double?
Bakul Shah
bakul at BitBlocks.com
Thu Aug 4 17:08:15 GMT 2005
> PROPERTIES OF LONG DOUBLE
> Base = 2
> Significant base digits = 53 (= at least 15 decimal digits)
$ cat x.c
#include <machine/float.h>
static double x = DBL_MAX;
static long double min = LDBL_MIN;
static long double max = LDBL_MAX;
$ gcc -S x.c
$ cat x.s
.file "x.c"
.data
.p2align 3
.type x, @object
.size x, 8
x:
.long -1
.long 2146435071
.p2align 4
.type min, @object
.size min, 12
min:
.long 0
.long -2147483648
.long 1
.p2align 4
.type max, @object
.size max, 12
max:
.long 0
.long -2147483648
.long 32767
.ident "GCC: (GNU) 3.4.4 [FreeBSD] 20050518"
So this indicates long double is 15 bits of exponent, 64 bits of mantissa.
More information about the freebsd-current
mailing list