Rounding errors using doubles?

David Edelsohn dje@watson.ibm.com
Wed Mar 31 23:46:00 GMT 1999


>>>>> Sam Lantinga writes:

Sam> BTW, does anyone know what precision is used on the PPC and Alpha
Sam> architectures?

	Are you referring to wordsize or significand bits?  I think that
the following table will be useful:

/* The number of useful digits depends upon the size of the     */
/* hardware floating point word.  Several word sizes            */
/* and the corresponding digits are:                            */
/*     Word size   Significand bits   Decimal digits            */
/*        32            24                 9                    */
/*        64            53                17                    */
/*        80            64                21                    */
/*       128           106                33                    */
/*       128           113                36                    */

	PowerPC supports 32-bit wordsize floats and 64-bit wordsize
doubles.  I assume that your reference to 53-bits describes significand
bits in which case PowerPC supports that with its 64-bit wordsize.

David



More information about the Gcc mailing list