r8013: add fixnum-width
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 20 Oct 2003 18:36:47 +0000 (18:36 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 20 Oct 2003 18:36:47 +0000 (18:36 +0000)
math.lisp
package.lisp

index 0197d52d5652a9fcdf28f117a309766fc7f9dc12..e9118443fdec24c716cf21898b42615ce5973692 100644 (file)
--- a/math.lisp
+++ b/math.lisp
@@ -70,3 +70,6 @@
            (incf (aref bins bin))))))
     (values bins min max)))
              
+
+(defun fixnum-width ()
+  (nth-value 0 (truncate (+ (/ (log (1+ most-positive-fixnum)) (log 2)) .5))))
index 803dc120129513310530598a40eb0444d138b716..f6cb2176a8de26069b26020a971098c78b5b8da2 100644 (file)
    ;; math.lisp
    #:ensure-integer
    #:histogram
+   #:fixnum-width
    
    ;; macros.lisp
    #:time-iterations