1 msgWide Streams
4 msgMINGW I/O support for file sizes > 2GB (LFS ...
2 msg#define WINVER 0x0400
11 msgWhy does g++ not link with libstdc++?
3 msghow to compile and link a library
1 msgHey Guys
5 msgCompile error using mingw
2 msg'include/c++/ext' missing fromgcc-part-c++-4.3....
1 msgFMTID_SummaryInformation andFMTID_UserDefinedPr...
2 msghow to realize mouse programming
3 msglooking for tiny light cross platform filesyste...
2 msgMinGW GCC Development Plan
3 msghow to use the read/write

GCC 4.3.0 20080502 (alpha) Released - Please he...
\ Aaron W. LaFramboise (5 May 2008)
. \ Chris Sutcliffe (5 May 2008)
. . \ Aaron W. LaFramboise (5 May 2008)
. . \ Earnie Boyd (5 May 2008)
. \ Doug Schaefer (5 May 2008)
. . \ Aaron W. LaFramboise (5 May 2008)
. . \ John Marriott (11 May 2008)
. . . \ Earnie Boyd (11 May 2008)
. . . . \ John Marriott (11 May 2008)
. . . . . \ Earnie Boyd (11 May 2008)
. . . . . . \ NightStrike (11 May 2008)
. \ John Brown (5 May 2008)
. . \ Aaron W. LaFramboise (5 May 2008)
. \ JonY (6 May 2008)
. . \ Bob Rossi (6 May 2008)
. . . \ Greg Chicares (6 May 2008)
. . . \ Aaron W. LaFramboise (6 May 2008)
. . . . \ Bob Rossi (6 May 2008)
. . . . . \ Tonal (6 May 2008)
. . . . . . \ Bob Rossi (6 May 2008)
. . . . . . . \ Mathias Fröhlich (6 May 2008)
. . . . . . . . \ Bob Rossi (6 May 2008)
. . . . . . . \ Earnie Boyd (6 May 2008)
. . . . . . . . \ Aaron W. LaFramboise (6 May 2008)
. . . . . . . . . \ Earnie Boyd (6 May 2008)
. . . . . . . . . \ Danny Smith (7 May 2008)
. . . . . . . . . . \ NightStrike (7 May 2008)
. . . . . . . . . . . \ Danny Smith (7 May 2008)
. . . . . . . . . . . . \ NightStrike (7 May 2008)
. . . . . . . . . . . \ Kai Tietz (7 May 2008)
. . . . . . . . . . \ Earnie Boyd (7 May 2008)
. . . . . \ Aaron W. LaFramboise (6 May 2008)
. . . \ Tonal (6 May 2008)
. . . . \ Bob Rossi (6 May 2008)
. . . . \ Aaron W. LaFramboise (6 May 2008)
. . . . . \ Tonal (8 May 2008)
. . . . . . \ Tonal (8 May 2008)
. . . . . . \ Earnie Boyd (8 May 2008)
. . . . . . . \ Tonal (8 May 2008)
. . . . . . . . \ Aaron W. LaFramboise (8 May 2008)
. . . . . . . . \ Earnie Boyd (8 May 2008)
. . . . \ Tonal (6 May 2008)
. \ Brian Dessent (6 May 2008)
. \ Brian Dessent (6 May 2008)
. . \ Aaron W. LaFramboise (6 May 2008)
. . . \ Tonal (6 May 2008)
. . . . \ Aaron W. LaFramboise (6 May 2008)
. \ Brian Dessent (6 May 2008)
. . \ Aaron W. LaFramboise (6 May 2008)
. . \ Greg Chicares (6 May 2008)
. \ StéphaneLarouche (7 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. \ ATS (7 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. . . \ Tonal (8 May 2008)
. \ Ramiro Polla (8 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. \ ATS (8 May 2008)
. . \ Charles Wilson (8 May 2008)
. . . \ Tonal (8 May 2008)
. . . . \ Aaron W. LaFramboise (8 May 2008)
. \ Sisyphus (8 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. \ Danny Smith (8 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. \ StéphaneLarouche (10 May 2008)
. . \ Aaron W. LaFramboise (10 May 2008)
. \ Brian Dessent (10 May 2008)
. \ StéphaneLarouche (10 May 2008)
. \ Tonal (11 May 2008)
. . \ Tonal (11 May 2008)
. . . \ JonY (11 May 2008)
. . . . \ Tonal (11 May 2008)
. . \ Tonal (11 May 2008)

10 msgMinGW gcc 3.x, 4.x and exceptions
4 msgdllwrap 2.17.50 20060824
12 msgstrtod is not C99-compatible
4 msgTest program crashes with g++ 4.2.1-dw2 usingli...
25 msgimlib2
4 msgDisassembly of stack frame
Subject:Re: GCC 4.3.0 20080502 (alpha) Released - Please helpus test it!
Group:Mingw-users
From:StéphaneLarouche
Date:10 May 2008


 
Aaron W. LaFramboise <aaron77thyme@...> writes:
> This is a problem in general on i386 due to the way that relatively
> simple operations (such as assignment) can cause the fp size to change.
> This is a very difficult problem to solve, and is present in most
> compilers based on i386 chips. The best workaround is careful coding to
> avoid inadvertent sensitivity or instability.

This is no really a problem for me, for all practical purposes the result is the
same, the difference being very small. But it still puzzles me who thought
computers provided a single answer when given the same set of commands.

> > I will try to find some time during the weekend to generate a
> > minimal example that reproduces the problem.
>
> Please let me know how this goes for you.

The difference seems to be related, in part, to the use of complex numbers.
Here's some (quite stupid) code:

---------- Beginning of test.cpp ----------

#include <cstdio>
#include <cmath>
#include <ctime>
#include <complex>

using namespace std;

const complex<double> j = complex<double>(0.0, 1.0);

int main ()
{
long i, nb = 10000000;
complex<double> x, answer = 1.0;
clock_t start, end;

start = clock();

for(i = 0; i < nb; i++)
{
x = double(i)/double(nb) * M_PI - j * double(i)/double(nb) * M_PI;
answer *= sin(x)*sin(x) + cos(x)*cos(x);
}

end = clock();

printf("Answer: %.16f + %.16fj\n", real(answer), imag(answer));
printf("number of clock ticks: %i\n", end-start);
}

---------- End of test.cpp ----------

I compile it using:
g++ -c test.cpp
g++ -o test.exe test.o

The number of clock ticks is:
- GCC 3.4.5: 77481
- GCC 4.2.1-dw2: 85532
- GCC 4.3.0 alpha: 86995

If I add the -O3 flag, the number of clock ticks is:
- GCC 3.4.5: 75168
- GCC 4.2.1-dw2: 36792
- GCC 4.3.0 alpha: 42741

If I replace the complex<double> by double (and adjust the code consequently),
the number of clock ticks is, for all versions, approximately 17200 when using
no flags, and approximately 8600 when using the -O3 flag.

I'll continue investigating since this explains why 4.3.0 alpha is slower than
4.2.1, but not why it is slower than 3.4.5 when using the -O3 flag.

I hope this helps,

Stéphane


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


© 2004-2008 readlist.com