Changeset 13310


Ignore:
Timestamp:
Dec 21, 2009, 11:47:21 PM (10 years ago)
Author:
rme
Message:

Update PRINT-OBJECT method for new random state objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new-random/lib/numbers.lisp

    r13067 r13310  
    347347(defparameter a-short-float 1.0s0)
    348348
    349 #+32-bit-target
     349#-x86-target
    350350(defmethod print-object ((rs random-state) stream)
    351   (format stream "#.(~S ~S ~S)"         ;>> #.GAG!!!
    352           'ccl::initialize-random-state
    353           (random.seed-1 rs)
    354           (random.seed-2 rs)))
    355 
    356 #+64-bit-target
     351  (let* ((s1 (random.seed-1 rs))
     352         (s2 (random.seed-2 rs)))
     353    #+64-bit-target
     354    (setq s1 (ldb (byte 16 16) s1)
     355          s2 (ldb (byte 16 0) s1))
     356    (format stream "#.(~S ~S ~S)"         ;>> #.GAG!!!
     357            'ccl::initialize-random-state
     358            s1
     359            s2)))
     360
     361#+x86-target
    357362(defmethod print-object ((rs random-state) stream)
    358   (let* ((s1 (random.seed-1 rs)))
    359     (format stream "#.(~S ~S ~S)"       ;>> #.GAG!!!
    360             'ccl::initialize-random-state
    361             (ldb (byte 16 16) s1)
    362             (ldb (byte 16 0) s1))))
    363 
    364 
     363  (let* ((s1 (random.mrg31k3p-state rs)))
     364    (format stream "#.(~s~{ ~s~})"       ;>> #.GAG!!!
     365            'ccl::initialize-mrg31k3p-state
     366            (coerce s1 'list))))
    365367
    366368(defun float-radix (float)
Note: See TracChangeset for help on using the changeset viewer.