Download - ACORN random numbers

This gives examples and downloadable executables in various languages.



This is the original code from 1989 and 2009 articles!

This version of ACORN uses 32-bit integers and works modulo 260. Although it works well, it does not pass all of the tests in the TestU01 test suite.

It is straightforward to modify so that it works modulo 290 or 2120 (which is desirable, in order to pass all the tests in the TestU01 test suite)

      DOUBLE PRECISION FUNCTION ACORNJ(XDUMMY)                                 
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)                                      
      PARAMETER (MAXORD=120,MAXOP1=MAXORD+1)                                   
      COMMON /IACO2/ KORDEJ,MAXJNT,IXV1(MAXOP1),IXV2(MAXOP1)                   
      DO 7 I=1,KORDEJ                                                          
        IF (IXV2(I+1).GE.MAXJNT) THEN                                          
      IF (IXV1(I+1).GE.MAXJNT) IXV1(I+1)=IXV1(I+1)-MAXJNT                      
    7 CONTINUE                                                                 
     1          +DBLE(IXV2(KORDEJ+1))/MAXJNT)/MAXJNT                           

ACORN JavaScript - available soon

A javascript implementation of ACORN is acornJs.js, which closely follows the original code above, and can be adapted according to your needs.

Either - Link your HTML page(s) to this site:
<script src=""> </script>

 -  OR  - Use which contains the script and instructions.

ACORN for Windows - available soon

File contains compiled FORTRAN 32-bit and 64-bit Windows executables and instructions.

All information on this site © 2019 Roy Wikramaratna.
You may use all information for research and teaching purposes (with due acknowledgement).
For business or commercial or other use for gain, see contact page.
created 2019-01-31 / updated 2019-03-31