Re: making double type default to 80 or 128 bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/7/20 2:59 PM, dave via Gcc-help wrote:
> 
> Is it possible to modify the gcc compiler so that recompiling existing
> code and libraries will produce longer doubles (80 or 128 bytes)
> 
> without having to re declare all the double types.  This may be a stupid
> question but I'm looking for a quick fix to see if extra
> 
> precision helps with an optimization problem. Thanks.

There is no such thng as an 80 byte double. The standards state that we
shall use floating point types which are of specific bit widths and all
of those are perfectly aligned on perfect power of two bit widths. These
range from 16 bits to 256 bit width. To date I have not seen hardware
which natively supports the 256-bit floating point type.  The IBM POWER9
processor as well as the RISC-V and Fujitsu SPARC provide hardware for
the 128-bit width and they seem to work very well indeed. The 80-bit
thing to which you refer is a hack put in place by the intel/x86 world
simply because the hardware can not properly handle anything larger. It
should not exist at all in if we use the floating point standards.

You are far better off using gmp and mpfr and mpc ( et. al. ) to attain
a wider degree of floating point precision but you will never get very
far using x86 hardware. It simply can not do that and the 80-bit hack is
just that, a hack.

Dennis



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux