gcc bug report - Incorrect floating point calculations.
Blanchet, Gilles (Leg)
BlanchgI@SNCTEC.com
Mon Mar 17 23:31:00 GMT 2003
This is a bug report for the DJGPP port of gcc 3.2.2 relating to incorrect
floating point calculations.
Two compilers where used to perform the test:
(1) Visual C++ 5.0, SR3
(2) gcc 3.2.2
The tests have been performed on the following two systems (with identical
results):
(1) A pentium IV based computer under Windows 2000 PRO.
(2) An Athlon XP 2000+ based computer under Windows XP PRO (SR1).
Please find attached the C++ source code files ( t_cubic.cpp, cubic.h ) and
two executables,
one compiled with VC++ 5.0 (SR3) ( t_cubic.vcc.exe ) and the other compiled
with gcc 3.2.2 ( t_cubic.gcc.exe ).
<<bug.zip>>
The VC++ version gives the correct (expected) results whereas the gcc
version results into incorrect calculations.
The expected results are documented as a comment at the end of the source
file: t_cubic.cpp.
The errors are likely due to rounding errors. It seems that the code
generated by the gnu compiler fails to exploit
the full capabilities of the FPU of the Pentium IV or the Athlon processor,
as opposed to the Microsoft compiler which
fully exploit the harware capabilities.
Question: Does that same problem occurs under Linux?
Gilles Blanchet
tel: (450) 581-3080 ext 8287
e-mail: blanchgi@snctec.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030317/97405bc3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.zip
Type: application/octet-stream
Size: 171793 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030317/97405bc3/attachment.obj>
More information about the Gcc-bugs
mailing list