From: SF/projects/mingw n. l. <min...@li...> - 2011-01-25 09:17:12
|
Bugs item #3164935, was opened at 2011-01-24 20:30 Message generated for change (Comment added) made by keithmarshall You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3164935&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: gcc >Group: None >Status: Open >Resolution: None Priority: 5 Private: No Submitted By: Abel K (abelk) >Assigned to: Cesar Strauss (cstrauss) Summary: Incorrect computation with complex numbers Initial Comment: gcc -std=c99 complexbug3.c -o complexbug3.exe & complexbug3 (0.2 - I*0.3)*(0.3 - I*0.9) = (0.06, -0.09) gcc complexbug3.c -o complexbug3.exe & complexbug3 (0.2 - I*0.3)*(0.3 - I*0.9) = (-0.21, -0.27) gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=c:/program files/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto- wrapper.exe Target: mingw32 Configured with: ../gcc-4.5.0/configure --enable-languages=c,c++,ada,fortran,obj c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r untime-libs --disable-werror --build=mingw32 --prefix=/mingw Thread model: win32 gcc version 4.5.0 (GCC) ld -v GNU ld (GNU Binutils) 2.20.51.20100613 ver Microsoft Windows [Version 5.2.3790] ---------------------------------------------------------------------- >Comment By: Keith Marshall (keithmarshall) Date: 2011-01-25 09:17 Message: I'm sorry; I completely missed the first result in your original report, on first reading. Clearly *that* result is incorrect. FWIW, I am not able to reproduce this with GCC-3.4.5, (my Linux hosted mingw32-gcc cross-compiler), nor with the native GCC-4.4.5 on the Linux host itself. However, I *am* able to reproduce it with the latest MinGW GCC-4.5.2 on Windows-Vista, so perhaps this is a regression in the GCC-4.5 series. Unless Cesar has some alternative idea, I guess you need to report this upstream, to the GCC maintainers directly. ---------------------------------------------------------------------- Comment By: Keith Marshall (keithmarshall) Date: 2011-01-24 21:56 Message: Sorry, but I don't understand what you think the problem is here; (+0.2 * +0.3 = +0.06) + ((i * i = -1) * -0.3 * -0.3 = -0.27) = +0.21; (+0.2 * -0.9i = -0.18i) + (0.3 * -0.3i = -0.09i) = -0.27i; that result looks completely correct to me. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3164935&group_id=2435 |