Changeset 15649


Ignore:
Timestamp:
Feb 2, 2013, 8:30:13 PM (6 years ago)
Author:
gb
Message:

TRUNCATE - (truncate most-negative-fixnum bignum): don't return stack-consed

pseudobignum

REM - special-case (rem most-negative-fixnum (- most-negative-fixnum))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-numbers.lisp

    r15560 r15649  
    11811181         (bignum (if (eq number target::target-most-negative-fixnum)
    11821182                   (with-small-bignum-buffers ((bn number))
    1183                      (bignum-truncate bn divisor))
     1183                     (multiple-value-bind (q r) (bignum-truncate bn divisor)
     1184                       (if (eq r bn)
     1185                         (values q number)
     1186                         (values q r))))
    11841187                   (values 0 number)))
    11851188         (double-float (truncate-rat-dfloat number divisor))
     
    15571560     (number-case divisor
    15581561       (fixnum (nth-value 1 (%fixnum-truncate number divisor)))
    1559        (bignum number)
     1562       (bignum
     1563        (if (and (eql number target::target-most-negative-fixnum)
     1564                 (eql divisor (- target::target-most-negative-fixnum)))
     1565          0
     1566          number))
    15601567       (t (nth-value 1 (truncate number divisor)))))
    15611568    (bignum
Note: See TracChangeset for help on using the changeset viewer.