http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46080

--- Comment #2 from Vincent Lefèvre <vincent at vinc17 dot org> 2010-10-20 
01:51:56 UTC ---
Created attachment 22089
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22089
sh script to test sqrtf

Similar problems can also be found with:

  printf ("%.60f\n%.60f\n%.60f\n", sqrtf(x), sqrtf(x), sqrtf(x));

I've found that every GCC version I could test was showing some incorrect
behavior (but GCC 4.2.4 was the most consistent one). With the attached script,
I get:

           -DSEP  -O0   -O1   -O2
GCC 3.4.6   SSS   SSS   SDD   SDD
GCC 4.1.3   SSS   SSS   DSS   DDS
GCC 4.2.4   SSS   SSS   DDD   DDD   (x86)
GCC 4.3.5   SSS   SSS   DSS   DDD   (ditto with GCC 4.3.2 on x86)
GCC 4.4.5   DSS   SSD   DSS   DDD

where S means that one gets the result in single precision (as expected) and D
means that one gets the result in double precision.

Reply via email to