From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; SunOS 5.8 sun4m) Description of problem: when programs are compiled with -mieee, denormalized single precision floating point numbers are printed incorrectly How reproducible: Always Steps to Reproduce: 1. gcc -mieee bug5.c -lm 2. a.out Actual Results: result 1a: 1.175494e-38 -8.733655e+01 result 1b: 1.349571e-308 result 1c: 1.425942e-38 Expected Results: result 1a: 1.175494e-38 -8.733655e+01 result 1b: 7.129711e-39 result 1c: 1.425942e-38 Additional info: Expected results were run on a sparc 20 where denormalized numbers are treated correctly. Result 1b in the actual results is clearly wrong. However, result 1c (which is the number printed in result 1b multiplied with 2) is clearly correct. This suggests that the denormalized numbers themselves are treated correctly, but that printf prints them out incorrectly. All variables in this program are single precision numbers, an exponent of e-308 is clearly out of range, even for a denormalized number. Sample code is available at the URL listed above, and will also be attached.
Created attachment 26754 [details] sample program that illustrates the bug
Its a kernel problem. I submitted a patch against the 2.4.18 kernel a few days ago: http://marc.theaimsgroup.com/?l=linux-kernel&m=101656561600848&w=2 You should be able to back port the patch without any problems. --George
As this is now in upstream code and in the upcoming shippable kernel... closing.