This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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 Mon, Jul 31, 2006 at 08:46:15AM -0400, Jack Howarth wrote:
> Steve,
>    I'm not sure what results I should expect from equidistrib.f90. With
> n = 10000000, I get the following output on MacOS X with yesterdays
> random patch...
> 
> 196528 196115 195784 196360 196150 195406 195826 196140 196380 196752
> 196528 196114 195785 196359 196151 195406 195825 196141 196379 196752
> 196528 196114 195785 196359 196151 195406 195825 196141 196379 196752
>    35.94998    
>    35.9289314000000     
>    35.92893140000000000000000000000046      
>   0.279  0.499  4.640 seconds
> 
> Does this look remotely correct?

Yes.

The first 3 lines are the number of RNs that fall within the
first ten bins.  This is roughly 10000000/51=196078.  Line
1 is for real(4), line 2 is for real(8), and real(16) is
the 3rd line.  Because the 3 lines are identical, one may 
conclude that the 3 sequence do match due to their matching
most significant bits.

The next 3 lines are the chi-squared values for the 3 sequences.
I'd need to check the table in Knuth to interpret the value of
35 with more certainty.  I do find the value for real(16) to 
be a little odd.  I won't expect such a long string of zeros
after the 8th decimal place. 

The last line is simply the time to generate all the random
numbers for real(4), real(8), and real(16), respectively.

Can you add 'print *, x4(1:3) ; print *, x8(1:3); print*, x10(1:3)'
to print the first three RNs?
-- 
Steve


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