Thank you for your analysis.
Luckily, our computations, well, I guess most guys here, do not depend on 53-bit precision of random number.
It was probably just written by my advisor by himself who is one of the main figures in quantum Monte Carlo. I am not sure what paper this RNG is based on, perhaps it is not based one particular paper.
But perhaps it is not very difficult to just directly test the performance and quality of this RNG with others.
Obviously, some stupid part in the last some lines of this module is added by me, as you already observed, some
!call RANDOM_SEED(SIZE=n)
!call RANDOM_SEED(PUT=iseed) ! set the internal ran function's seed.
and,
function randomn(n) ! the default ramdom_number subroutine.
! return an array of random variates (0,1)
integer(kind=i8) :: n
real(kind=r8), dimension(n) :: randomn
call RANDOM_NUMBER(randomn)
return
end function randomn
subroutine random1(x) ! generate random number x using the default ramdom_number subroutine.
real(kind=r8) :: x
call RANDOM_NUMBER(x)
those pieces calls the intrinsic rng is obviously added by me for entertainment, and never used.