null character without reason in written files

N.M. Maclaren nmm1@cam.ac.uk
Fri Nov 1 08:51:00 GMT 2013


On Oct 31 2013, Steve Kargl wrote:
>
>gfortran uses 4 instances of Marsaglias's 32-bit KISS prng.  There is a
>long comment in libgfortran/intrinsics/random.c about the generator.
>
>Why 4 instance?  gfortran supports four real data types with
>24, 53, 64, and 113 bits of precision.  The first prng fills
>the 24 bits of REAL or the first 32 bits of the other real types.
>The 2nd kiss instance fills the next 21 bits of REAL(8) and the
>or the 32 bits of REAL(10).  The remaining 2 instances fill the
>last 49 bits of REAL(16).  This then allows one to change the
>kind type parameter to test an algorithm for robustness where
>there is some consistence between random_number calls.

Thanks.  There are some potential weaknesses in that approach, and
I might run a test on one that springs to mind, since I can do it
for a couple of minutes' work.


Regards,
Nick Maclaren.



More information about the Fortran mailing list