Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Aug 2005 10:08:14 -0700
From:      Bakul Shah <bakul@BitBlocks.com>
To:        Chuck Swiger <cswiger@mac.com>
Cc:        freebsd-current@freebsd.org, Steve Kargl <sgk@troutmask.apl.washington.edu>
Subject:   Re: Number of significand bits in long double? 
Message-ID:  <200508041708.j74H8EBA097692@gate.bitblocks.com>
In-Reply-To: Your message of "Thu, 04 Aug 2005 12:49:59 EDT." <42F24737.2060705@mac.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508041708.j74H8EBA097692>