Hi,

On 03/15/2013 04:59 PM, Keith Lofstrom wrote:
...  Are double and float synonyms for the same
double precision representation?

From http://en.wikipedia.org/wiki/C_data_types:

"The actual size of floating point types also varies by implementation. The only guarantee is that the long double is not smaller than double, which is not smaller than float. Usually, 32-bit and 64-bit IEEE 754 floating point formats are used, if supported by hardware."

The other issue could be that most calculations might be done using register values with precision far exceeding the precision of the variable in memory. That would complete 'hide' the expected effect of the float or double on the calculations. Use -ffloat-store to avoid this for your tests.

HTH,

Matthias

Reply via email to