Changeset 39953 in project


Ignore:
Timestamp:
04/10/21 20:24:31 (4 months ago)
Author:
Kon Lovett
Message:

remove gratuitous use of fixnum

Location:
release/5/srfi-27/trunk/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-27/trunk/tests/test-confidence.scm

    r39643 r39953  
    66(import random-source)
    77(import mwc moa mrg32k3a #;bsdrnd)  ;load them all
    8 (import (chicken fixnum))
    98
    109;; Select platform specific entropy source
     
    109108
    110109  ;generate increasingly large numbers
    111   (do ((k 0 (fx+ k 1))
     110  (do ((k 0 (+ k 1))
    112111       (n 1 (* n 2)))
    113       ((fx> k 1024))
     112      ((> k 1024))
    114113    (print* "generating large numbers: " k " bits") (display #\return)
    115114    (checked-random-integer n))
     
    118117  ;generate some reals
    119118  (display "generating reals [1000 times]: ") (flush-output)
    120   (do ((k 0 (fx+ k 1)))
    121       ((fx= k 1000))
     119  (do ((k 0 (+ k 1)))
     120      ((= k 1000))
    122121      (checked-random-real))
    123122  (print "ok")
  • release/5/srfi-27/trunk/tests/test-mrg32k3a.scm

    r39643 r39953  
    44(import (chicken base))
    55(import srfi-27 mrg32k3a)
    6 (import (chicken fixnum))
    76
    87;; Select platform specific entropy source
     
    3938         (rand (random-source-make-reals s)))
    4039    (random-source-state-set! s '(mrg32k3a 1 0 0 1 0 0))
    41     (do ((k 0 (fx+ k 1)))
    42         ((fx= k 16)
     40    (do ((k 0 (+ k 1)))
     41        ((= k 16)
    4342         (let ((state (random-source-state-ref s)))
    4443           (unless (equal? initial-state state)
     
    6968         (rand (random-source-make-reals s)))
    7069    (random-source-state-set! s '(mrg32k3a 12345 12345 12345 12345 12345 12345))
    71     (do ((k 0 (fx+ k 1)))
    72         ((fx= k 10000000)
     70    (do ((k 0 (+ k 1)))
     71        ((= k 10000000)
    7372         (unless (< (abs (- x 5001090.95)) 0.01)
    7473           (error 'check-mrg32k3a "bad sum over 10^7 reals" x)))
Note: See TracChangeset for help on using the changeset viewer.