Commit 9685cb46 by Matthias Redies

### this is THE worst random number generator every. Who wrote this?

parent dba4ae41
 ... ... @@ -14,7 +14,6 @@ math/inwint.f math/matmul.f math/outint.f math/points.f math/qranf.f math/qsf.f math/rfft.F math/sphbes.f ... ... @@ -23,6 +22,7 @@ math/util.F math/difcub.f ) set(fleur_F90 \${fleur_F90} math/qranf.f90 math/differentiate.f90 math/fft2d.F90 math/fft3d.f90 ... ...
 MODULE m_qranf CONTAINS REAL FUNCTION qranf(x,j) c ********************************************************** c quasi random generator in the interval (0.,1.) c ********************************************************** MODULE m_qranf CONTAINS REAL FUNCTION qranf(x,j) ! ********************************************************** ! quasi random generator in the interval (0.,1.) ! ********************************************************** IMPLICIT NONE C .. Scalar Arguments .. ! .. Scalar Arguments .. REAL x INTEGER j C .. C .. Intrinsic Functions .. ! .. ! .. Intrinsic Functions .. INTRINSIC aint C .. ! .. j = j + 1 qranf = j*x qranf = qranf - aint(qranf) RETURN END FUNCTION END END FUNCTION END
• Owner

Hey, this will be initialized with x=sqrt(13) after all!

• Developer

When it's called it uses the same x and j throughout the whole loop. I don't know what it does but I have a suspicion it's wrong.

• Owner

No, j actually is increased by one each time this is called. Thus "quasi-random" numbers are generated... :-)

• Developer

If this keeps failling i will just revert it. It seems to work or fail fairly randomly.

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment