This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch libfortran/28452] random intrinsics for large reals

On Thu, Jul 27, 2006 at 10:46:49PM +0200, Thomas Koenig wrote:
> :ADDPATCH fortran:
> the attached patch fixes PR 28452.  It also speeds up random number
> generation for REAL(kind=4) quite nicely (by about a factor of 2.5).
> I have regression-tested this on i686-pc-linux-gnu.  I don't have
> a system with REAL(16), nor do I have a system where FLT_RADIX is
> 16 (IBM/360), so I would appreciate if this was tested before
> committing.

I'll review this patch on Saturday.  Note, I've read the
patch(es) you've attached to the bugzilla report.

Have you run any tests on the quality?  A hard drive failure
caused me to loose the few tests that I had.  I wrote a new
equidistance test (ie., divide the interval [0,1) into binsi
and count the number of values in each bin) this morning.  Our
current rng shows

Number of random numbers: 100000000
          Number of bins: 100
998616 1000019 1000234 1001897 999741 1000524 999975 1000251 1000366 998753
998616 1000019 1000234 1001897 999741 1000524 999976 1000251 1000365 998753
 t1 - t0 = 11.29466 seconds

That's 100 million real(4) and real(8) random values split into 
100 bins.  The chi-square value is nominally 84.4, which suggest
that the current implement is a good generator with respect to
this specific test.  This also shows the counts for the first 10 

Note, that's 11.3 seconds of cpu time to generate the random
numbers and to compute the chi-square values.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]