diff options
author | Gabriel Dos Reis <gdr@axiomatics.org> | 2015-12-31 13:29:37 -0800 |
---|---|---|
committer | Gabriel Dos Reis <gdr@axiomatics.org> | 2015-12-31 13:29:37 -0800 |
commit | 039d244dbef31e4ca6d34d2cf42b58b41a572884 (patch) | |
tree | a8682ba2deba76a923969a9c92f8f4441703832b /src/interp | |
parent | 3fe5ede20d325254817e50d735e9e09c0c875860 (diff) | |
download | open-axiom-039d244dbef31e4ca6d34d2cf42b58b41a572884.tar.gz |
Improve 'random()' from Integer domain.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/g-opt.boot | 2 | ||||
-rw-r--r-- | src/interp/lisp-backend.boot | 4 | ||||
-rw-r--r-- | src/interp/spad.lisp | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 4dd126e3..453c972e 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -640,7 +640,7 @@ $VMsideEffectFreeOperators == %ilength %ibit %icst0 %icst1 %icstmin %icstmax %imul %iadd %isub %igcd %ilcm %ipow %imin %imax %ieven? %iodd? %iinc %idec %irem %iquo %idivide %idec %irandom %imulmod %iaddmod %isubmod - %ilshift %irshift + %ilshift %irshift %ibigrandom %feq %flt %fle %fgt %fge %fmul %fadd %fsub %fexp %fmin %fmax %float? %fpowi %fdiv %fneg %i2f %fminval %fmaxval %fbase %fprec %ftrunc %fsqrt %fpowf %flog %flog2 %flog10 %fmanexp %fNaN? %fdecode diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index 3232f9fe..895f6134 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -276,6 +276,9 @@ expandIlt ['%ilt,x,y] == expandIgt ['%igt,x,y] == expandIlt ['%ilt,y,x] +expandIbigrandom ['%ibigrandom] == + ['RANDOM,['GET_-INTERNAL_-REAL_-TIME]] + -- Floating point support expandFbase ['%fbase] == @@ -689,6 +692,7 @@ for x in [ ['%ilt, :function expandIlt], ['%ineg, :function expandIneg], ['%idivide, :function expandIdivide], + ['%ibigrandom, :function expandIbigrandom], ['%i2f, :function expandI2f], ['%fdecode, :function expandFdecode], diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp index cd69a95f..f5c30c33 100644 --- a/src/interp/spad.lisp +++ b/src/interp/spad.lisp @@ -127,7 +127,6 @@ (define-function '|not| #'NOT) -(defun |random| () (random (expt 2 26))) (defun \,plus (x y) (+ x y)) (defun \,times (x y) (* x y)) (defun \,difference (x y) (- x y)) |