Am Sun, 02 Jun 2013 07:17:12 +0200 schrieb "finalpatch" <fen...@gmail.com>:
> the following code compiled with GDC shows the bug > (I'm using the gcc 4.8 windows mingw32 version from > https://bitbucket.org/goshawk/gdc/downloads) > > import std.math; > import std.stdio; > import std.range; > import std.parallelism; > > void main() > { > enum n = 1000; > float step = 1.0f/n; > > float[n] results_singlethreaded; > float[n] results_multithreaded; > > foreach(i; iota(n)) > results_singlethreaded[i] = pow(step * i, 0.4545f); > foreach(i; parallel(iota(n))) > results_multithreaded[i] = pow(step * i, 0.4545f); > foreach(i; iota(n)) > assert(results_singlethreaded[i] == > results_multithreaded[i]); > } > > ~/Desktop $ ./test.exe > core.exception.AssertError@test.d(26): Assertion failure > > The same code passes without assertion when compiled with DMD. Please file a bug report on bugzilla.gdcproject.org I can't reproduce this on linux/posix. Could you use feqrel to check the number of equal bits of the single/multithreaded results?