Changeset 8435 in project


Ignore:
Timestamp:
02/13/08 07:40:01 (12 years ago)
Author:
Kon Lovett
Message:

Using wrong initial state! Do not edit in wee hours.

Location:
release/3/srfi-27/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/3/srfi-27/trunk/mrg32k3a-primitives.scm

    r8432 r8435  
    171171  ; 0 3 6 9 12 15 of A^16, see below
    172172  (f64vector
    173    1250826159
    174    3004357423
    175     431373563
    176    3322526864
    177     623307378
    178    2983662421) )
     173   1062452522
     174   2961816100
     175    342112271
     176   2854655037
     177   3321940838
     178   3542344109) )
    179179
    180180(define (mrg32k3a-unpack-state packed-state)
  • release/3/srfi-27/trunk/srfi-27.setup

    r8432 r8435  
    1010  'numbers                "1.8")
    1111
    12 #|
    1312(install-dynld entropy-structures *version*)
    1413
     
    3029
    3130(install-dynld srfi-27-large-numbers *version* -O3 -d0)
    32 |#
    3331
    3432(install-dynld mrg32k3a-primitives *version* -O3 -d0 +easyffi +dollar)
     
    4139(install-dynld moa *version*)
    4240
    43 #|
    4441(install-dynld srfi-27-parameters *version*)
    4542
     
    4744
    4845(install-dynld+docu srfi-27 *version*)
    49 |#
  • release/3/srfi-27/trunk/tests/conf-test.scm

    r8432 r8435  
    197197  (display "check A^16 * (1 0 0 1 0 0): ") (flush-output)
    198198  (let* ((s (make-random-source))
    199          (state1 (random-source-state-ref s))
     199         (initial-state (random-source-state-ref s))
    200200         (rand (random-source-make-reals s)))
    201201    (random-source-state-set! s '(lecuyer-mrg32k3a 1 0 0 1 0 0))
    202202    (do ((k 0 (fx+ k 1)))
    203203        ((fx= k 16)
    204          (let ((state2 (random-source-state-ref s)))
    205            (unless (equal? state1 state2)
    206              (error 'check-mrg32k3a "16-th state after (1 0 0 1 0 0) is wrong" state1 state2))))
    207 (print "State " k ": " (random-source-state-ref s))
     204         (let ((state (random-source-state-ref s)))
     205           (unless (equal? initial-state state)
     206             (error 'check-mrg32k3a "16-th state after (1 0 0 1 0 0) is wrong" initial-state state))))
    208207      (rand) ) )
    209208  (print "ok")
     
    211210  ; check if pseudo-randomize! advances properly
    212211  (display "checking random-source-pseudo-randomize! in [1 2] advance: ") (flush-output)
    213   (let ((s (make-random-source))
    214         (initial-state (random-source-state-ref s)))
    215     (random-source-pseudo-randomize! s 1 2)
    216     (let ([state (random-source-state-ref s)])
    217       (unless (equal? state initial-state)
    218         (error 'check-mrg32k3a "pseudo-randomize! gives wrong result" state initial-state))))
     212  (let ((s (make-random-source)))
     213    (random-source-pseudo-randomize! s 1 2) 
     214    (let ((initial-state (random-source-state-ref s)))
     215      (random-source-pseudo-randomize! s 1 2)
     216      (let ([state (random-source-state-ref s)])
     217        (unless (equal? state initial-state)
     218          (error 'check-mrg32k3a "pseudo-randomize! gives wrong result" initial-state state)))))
    219219  (print "ok")
    220220
Note: See TracChangeset for help on using the changeset viewer.