From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,890e7bb13b3c2a7f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.82.193 with SMTP id k1mr256970wiy.0.1350639906473; Fri, 19 Oct 2012 02:45:06 -0700 (PDT) Path: q10ni65184847wif.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: How to get high-precision floating point--MPFR Date: Fri, 19 Oct 2012 11:45:41 +0200 Organization: cbb software GmbH Message-ID: References: <29fc1667-46f8-40b5-aef9-bea87dc862b4@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-10-19T11:45:41+02:00 List-Id: 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. You could compare attributes of Long_Long_Float and Interfaces.C.long_double, 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