Representation of 128 bit floating point numbers in FreeBSD amd64 and Clang

Steve Kargl sgk at troutmask.apl.washington.edu
Thu Oct 31 14:38:33 UTC 2013


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


More information about the freebsd-numerics mailing list