------- Comment #4 from jerome dot duquennoy at wanadoo dot fr 2008-02-15 10:11 ------- Created an attachment (id=15156) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15156&action=view) floating point tests with different FPU configuration
This archive contains code to test the behavior of the floating points using different configurations of the i387 FPU. It shows that the Float type in ada only works well when using a 64 bits mantissa. When using a 53 bits mantissa, the results are the same as those obtained using test_fio under valgrind or using Oracle's lib : ---------------------------------------- CW origine: 1.20001E+00 SW = 895 {Infinity Off; NEAREST_OR_EVEN; BITS_64} ---------------------------------------- Bits_53: 1.20831E+00 SW = 639 {Infinity Off; NEAREST_OR_EVEN; BITS_53} ---------------------------------------- Bits_24: 0.E+00 SW = 127 {Infinity Off; NEAREST_OR_EVEN; BITS_24} ---------------------------------------- The output under valgrind is weird : the Float IOs behave as if the FPU was is 53 bits mantissa mode, but the config is reported to be 64 bits ... I guess this has to do with the way valgrind works. When calling an oracle function, we can see that the FPU is in 64 bits mantissa mode before the call, and 53 bits after, thus the problems we have. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35194