comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry <lanceboyle@qwest.net>
Cc: mailbox@dmitry-kazakov.de
Subject: Re: How to get high-precision floating point--MPFR
Date: Fri, 19 Oct 2012 03:31:23 -0700 (PDT)
Date: 2012-10-19T03:31:23-07:00	[thread overview]
Message-ID: <6b1e1af2-d9d0-47ce-a333-b54e979155ac@googlegroups.com> (raw)
In-Reply-To: <hik8d6t401vh$.1b453o7gjjbhp.dlg@40tude.net>

On Friday, October 19, 2012 2:45:06 AM UTC-7, Dmitry A. Kazakov wrote:
> On Fri, 19 Oct 2012 01:57:19 -0700 (PDT), Jerry wrote:
> 
> > And why is the Ada type using less
> > mantissa bits than the hardware?
> 
> AFAIK x86/x86-64 do not have hardware 128-bit floats (IEEE or not). See 
> 
> http://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format
> 
> Which also says that gcc's long double is merely 80-bit extended precision.
> That, I presume, corresponds to the GNAT's Long_Long_Float.

That makes sense. I think I once knew that.

> You could compare attributes of Long_Long_Float and
> Interfaces.C.long_double, 

The same program reports:
In Interfaces.C, long_double bits is 128

T'Machine_Mantissa (A.5.3), in particular, it
> should be 64 for 80-bit extended precision.
> 
> Why GNAT uses 128 bit instead of 80 actually used bit? Maybe, because of
> alignment issues.
> 
> -- 
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de



  reply	other threads:[~2012-10-19 10:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19  8:57 How to get high-precision floating point--MPFR Jerry
2012-10-19  9:45 ` Dmitry A. Kazakov
2012-10-19 10:31   ` Jerry [this message]
2012-10-19 10:47 ` Georg Bauhaus
2012-10-19 11:05   ` Jerry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox