anchor.diff:                      (1- (* (sys.int::%object-header-data bignum) 2)))))
       (logtest #x80000000 sign-word)))
   
  -;; TODO: bignums vs float infinity/nan
  +(defmacro bignum-float-compare (the-bignum the-float float-type swap-args)
  +  (multiple-value-bind (float< float= truncate-float m-p-f-float m-n-f-float p-inf n-inf)
  +      (ecase float-type
  +        (single-float
  +         (values 'sys.int::%%single-float-<
  +                 'sys.int::%%single-float-=
  +                 '%%truncate-single-float-to-integer
  +                 sys.int::most-positive-fixnum-single-float
  +                 sys.int::most-negative-fixnum-single-float))
  +        (double-float
  +         (values 'sys.int::%%double-float-<
  +                 'sys.int::%%double-float-=
  +                 '%%truncate-double-float-to-integer
  +                 sys.int::most-positive-fixnum-double-float
  +                 sys.int::most-negative-fixnum-double-float)))
  +    `(cond ((sys.int::float-nan-p ,the-float) nil)
  +           ((sys.int::%%bignum-negative-p ,the-bignum)
  +            (cond ((,float< ,the-float ,m-n-f-float)
  +                   (if (,float= ,the-float ,n-inf)
  +                       ,(if swap-args t nil)
  +                       (,(if swap-args '> '<) ,the-bignum (,truncate-float ,the-float))))
  +                  (t ,(if swap-args nil t))))
  +           (t
  +            (cond ((,float< ,m-p-f-float ,the-float)
  +                   (if (,float= ,the-float ,p-inf)
  +                       ,(if swap-args nil t)
  +                       (,(if swap-args '> '<) ,the-bignum (,truncate-float ,the-float))))
  +                  (t ,(if swap-args t nil)))))))
  +
   (defun sys.int::generic-< (x y)
     (number-dispatch (x :expected-type 'real)
       (fixnum
  
positive.code:         (and (fixnum-fits-in-double-float-p y)
               (sys.int::%%double-float-= x (float y 0.0d0))))
         (bignum
          (= (%%truncate-double-float-to-integer x) y))
         (ratio
          (ratio-= (rational x) y))
         (single-float
  
negative.code:        (fixnum
          (fixnum-float-compare y x single-float t))
         (bignum
          (bignum-float-compare y x single-float t))
         (ratio
          (ratio-< (rational x) y))
         (single-float
  