Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2013 11:09:22 -0400
From:      Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-numerics@freebsd.org
Subject:   Re: Representation of 128 bit floating point numbers in FreeBSD amd64 and Clang
Message-ID:  <CAOgwaMswq2Uj=gwqFYWUMkcMP1YBYGQOavp2eUW1Z2buernVcw@mail.gmail.com>
In-Reply-To: <20131031143832.GA60432@troutmask.apl.washington.edu>
References:  <CAOgwaMs=NKfDpjOY9=5+KYFUdbzeMpxMF_nxZP21y8RTb_cR9w@mail.gmail.com> <20131031143832.GA60432@troutmask.apl.washington.edu>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Thu, Oct 31, 2013 at 10:38 AM, Steve Kargl <
sgk@troutmask.apl.washington.edu> wrote:

> On Thu, Oct 31, 2013 at 09:27:34AM -0400, Mehmet Erol Sanliturk wrote:
> >
> > In FreeBSD amd64 and Clang ,
> > how can I represent 128 bits ( 34 digits ) variables ?
> >
>
> Not sure it can be done with clang, but GCC supports
> a __float128 type.  GCC refers to this as its TCmode.
> gfortran, the Fortran compiler that supports REAL(16),
> uses __float128 internally.  I've never directly used
> __float128, so can't help beyond this.
>
> If you need 128-bits in C on ia32 or x86_64 hardware,
> you should probably look into using mpfr and mpc.
>
> --
> Steve
>



These are defined in the following library :

http://gcc.gnu.org/onlinedocs/libquadmath/

(  GCC libquadmath )


For printing values , the following is required :

http://gcc.gnu.org/onlinedocs/libquadmath/quadmath_005fsnprintf.html


I could not find Clang libquadmath .


Thank you very much .

Mehmet Erol Sanliturk



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAOgwaMswq2Uj=gwqFYWUMkcMP1YBYGQOavp2eUW1Z2buernVcw>