r8580: add tests/improvements to ensure-keyword-*
[kmrcl.git] / math.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))))