|
From: Nicholas N. <n.n...@gm...> - 2009-02-26 00:25:52
|
On Thu, Feb 26, 2009 at 5:52 AM, Ivan Jager <aij...@an...> wrote: >> >> I propose changing the test to omit the +/- at the start of the >> answers (to remove +0 and -0 differences), to print 12 decimal places >> rather than 13 (to remove the difference in the 13th decimal place), >> and possibly to filter the sign of the exponent if its zero (to remove >> the difference between 1.0000e-00 and 1.0000e+00). > > Ok, what am I missing? IIRC the exponent part of an IEEE FP number is > represented by an integer, where the exponent is calculated by taking that > integer as unsigned and subtracting a constant. So, how is it possible to > have a different representation for 1.0000e-00 and 1.0000e+00? I don't know. Something in the printf() implementation? > Out of curiosity, are you encountering the differences on PPC or on an x86 > Mac? The only thing I can think of which could cause a diffirence on x86 > would be the compiler, since on Linux/x86 at least GCC defaults to not using > -ffloat-store. If I understand correctly, compiling the tests with > -ffloat-store should produce the same results as on any sane architecture, > however that would also mean the tests wouldn't be testing the extended > precision part of Valgrind/x86. x86 Mac. N |