Changeset 39954 in project


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

remove inexact integer w/ 32bit, usual procs ok

Location:
release/5/srfi-27/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-27/trunk/moa.scm

    r39647 r39954  
    287287        (lambda (n)
    288288          (check-positive-integer INTERNAL-ID n 'range)
    289           (cond-expand
    290             (64bit
    291               (cond
    292                 ((and (fixnum? n) (<= n maximum-unsigned-integer32))
    293                   (moa-random-integer state n))
    294                 (else
    295                   (moa-random-large state n) ) ) )
    296             (else ;32bit
    297               (cond
    298                 ((and (fixnum? n) (<= n maximum-unsigned-integer32))
    299                   (moa-random-integer state n))
    300                 ;'n' maybe bignum - must be convertable to "unsigned-integer32"
    301                 ((<= n eMAX)
    302                   (moa-random-integer state (exact->inexact n)))
    303                 (else
    304                   (moa-random-large state n) ) ) ) ) ) )
     289          (cond
     290            ((and (fixnum? n) (<= n maximum-unsigned-integer32))
     291              (moa-random-integer state n))
     292            (else
     293              (moa-random-large state n) ) ) ) )
    305294      ;
    306295      (lambda (prec)
  • release/5/srfi-27/trunk/mrg32k3a.scm

    r39647 r39954  
    559559        (lambda (n)
    560560          (check-positive-integer INTERNAL-ID n 'range)
    561           (cond-expand
    562             (64bit
    563               (cond
    564                 ((and (fixnum? n) (<= n integer32-limit))
    565                   (mrg32k3a-random-integer state n))
    566                 #; ;UNUSED
    567                 ((and (fixnum? n) (<= n most-positive-fixnum))
    568                   (mrg32k3a-random-long state n))
    569                 (else
    570                   (mrg32k3a-random-large state n) ) ) )
    571             (else ;32bit
    572               (cond
    573                 ((and (fixnum? n) (<= n integer32-limit))
    574                   (mrg32k3a-random-integer state n))
    575                 ;'n' maybe bignum - must be convertable to "unsigned-integer32"
    576                 ((<= n eM1)
    577                   (mrg32k3a-random-integer state (exact->inexact n)))
    578                 #; ;UNUSED
    579                 ((<= n flonum-integer-limit)
    580                   (mrg32k3a-random-long state (exact->inexact n)))
    581                 (else
    582                   (mrg32k3a-random-large state n) ) ) ) ) ) )
     561          (cond
     562            ((and (fixnum? n) (<= n integer32-limit))
     563              (mrg32k3a-random-integer state n))
     564            #; ;UNUSED
     565            ((and (fixnum? n) (<= n most-positive-fixnum))
     566              (mrg32k3a-random-long state n))
     567            (else
     568              (mrg32k3a-random-large state n) ) ) ) )
    583569      ;
    584570      (lambda (prec)
  • release/5/srfi-27/trunk/mwc.scm

    r39647 r39954  
    286286        (lambda (n)
    287287          (check-positive-integer INTERNAL-ID  n 'range)
    288           (cond-expand
    289             (64bit
    290               (cond
    291                 ((and (fixnum? n) (<= n maximum-unsigned-integer32))
    292                   (mwc-random-integer state n))
    293                 (else
    294                   (mwc-random-large state n) ) ) )
    295             (else ;32bit
    296               (cond
    297                 ((and (fixnum? n) (<= n maximum-unsigned-integer32))
    298                   (mwc-random-integer state n))
    299                 ;'n' maybe bignum - must be convertable to "unsigned-integer32"
    300                 ((<= n eMAX)
    301                   (mwc-random-integer state (exact->inexact n)))
    302                 (else
    303                   (mwc-random-large state n) ) ) ) ) ) )
     288          (cond
     289            ((and (fixnum? n) (<= n maximum-unsigned-integer32))
     290              (mwc-random-integer state n))
     291            (else
     292              (mwc-random-large state n) ) ) ) )
    304293      ;
    305294      (lambda (prec)
  • release/5/srfi-27/trunk/srfi-27.egg

    r39922 r39954  
    22
    33((synopsis "Sources of Random Bits")
    4  (version "4.1.1")
     4 (version "4.1.2")
    55 (category data)
    66 (author "Sebastian Egner, for CHICKEN by Kon Lovett and [[Sergey Goldgaber]]")
     
    4444    (types-file)
    4545    (component-dependencies entropy-source entropy-support)
    46     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     46    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    4747  (extension entropy-procedure
    4848    (types-file)
    4949    (component-dependencies entropy-source entropy-support)
    50     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     50    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    5151  (extension entropy-port
    5252    (types-file)
    5353    (component-dependencies entropy-source entropy-support)
    54     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     54    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    5555  (cond-expand
    5656    (windows
     
    5959        (component-dependencies entropy-source entropy-port)
    6060        (csc-options
    61           "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings")) )
     61          "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings")) )
    6262    #; ;FIXME not ready for prime, or any, time
    6363    (linux
     
    6666        (component-dependencies entropy-source entropy-procedure)
    6767        (csc-options
    68           "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings")) )
     68          "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings")) )
    6969    (unix
    7070      (extension entropy-unix
     
    7272        (component-dependencies entropy-source entropy-port)
    7373        (csc-options
    74           "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings")) )
     74          "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings")) )
    7575    (else) )
    7676  ;; Random Source Modules
     
    113113      srfi-27-numbers srfi-27-vector-support
    114114      mrg32k3a random-source entropy-source entropy-clock)
    115     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     115    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    116116  (extension srfi.27.uniform-random
    117117    (types-file)
    118118    (component-dependencies srfi-27 srfi-27-numbers random-source)
    119     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     119    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    120120  (extension srfi-27-distributions-support
    121121    (types-file)
    122122    (component-dependencies srfi-27)
    123     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     123    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    124124  (extension srfi.27.bernoullis
    125125    (types-file)
    126126    (component-dependencies srfi-27 srfi-27-distributions-support)
    127     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     127    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    128128  (extension srfi.27.binomials
    129129    (types-file)
    130130    (component-dependencies srfi-27 srfi-27-distributions-support srfi.27.bernoullis)
    131     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     131    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    132132  (extension srfi.27.cauchys
    133133    (types-file)
    134134    (component-dependencies srfi-27 srfi-27-distributions-support)
    135     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     135    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    136136  (extension srfi.27.normals
    137137    (types-file)
    138138    (component-dependencies srfi-27 srfi-27-distributions-support)
    139     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     139    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    140140  ;needs normals
    141141  (extension srfi.27.gammas
    142142    (types-file)
    143143    (component-dependencies srfi-27 srfi-27-distributions-support srfi.27.normals)
    144     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     144    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    145145  ;needs gammas
    146146  (extension srfi.27.erlangs
    147147    (types-file)
    148148    (component-dependencies srfi-27 srfi-27-distributions-support srfi.27.gammas)
    149     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     149    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    150150  (extension srfi.27.exponentials
    151151    (types-file)
    152152    (component-dependencies srfi-27-distributions-support)
    153     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     153    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    154154  (extension srfi.27.geometrics
    155155    (types-file)
    156156    (component-dependencies srfi-27 srfi-27-distributions-support)
    157     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     157    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    158158  (extension srfi.27.levys
    159159    (types-file)
    160160    (component-dependencies srfi-27 srfi-27-distributions-support)
    161     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     161    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    162162  (extension srfi.27.lognormals
    163163    (types-file)
    164164    (component-dependencies srfi-27 srfi-27-distributions-support)
    165     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     165    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    166166  ;needs gammas exponentials
    167167  (extension srfi.27.paretos
    168168    (types-file)
    169169    (component-dependencies srfi-27 srfi-27-distributions-support)
    170     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     170    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    171171  (extension srfi.27.poissons
    172172    (types-file)
    173173    (component-dependencies srfi-27 srfi-27-distributions-support)
    174     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     174    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    175175  (extension srfi.27.triangles
    176176    (types-file)
    177177    (component-dependencies srfi-27 srfi-27-distributions-support)
    178     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     178    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    179179  (extension srfi.27.weibulls
    180180    (types-file)
    181181    (component-dependencies srfi-27 srfi-27-distributions-support)
    182     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     182    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    183183  (extension srfi.27.distributions
    184184    (types-file)
     
    198198      srfi.27.triangles
    199199      srfi.27.weibulls)
    200     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     200    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    201201  (extension srfi.27.vector
    202202    (types-file)
     
    205205      random-source
    206206      srfi-27-distributions-support srfi-27-vector-support)
    207     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     207    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    208208  ;; Composite Source Modules
    209209  (extension composite-entropy-source
    210210    (types-file)
    211211    (component-dependencies srfi-27 srfi-27-vector-support entropy-source)
    212     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
     212    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings"))
    213213  (extension composite-random-source
    214214    (types-file)
    215215    (component-dependencies srfi-27 srfi-27-vector-support random-source)
    216     (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings")) ) )
     216    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings" "-no-procedure-checks-for-usual-bindings")) ) )
Note: See TracChangeset for help on using the changeset viewer.