Opened 10 years ago

Closed 10 years ago

#666 closed defect (fixed)

truncate

Reported by: heller Owned by: gb
Priority: normal Milestone:
Component: Compiler Version: trunk
Keywords: Cc:

Description

Something seems fishy when inlining TRUNCATE:

Welcome to Clozure Common Lisp Version 1.5-dev-r13524M-trunk  (LinuxX8632)!
? (defun foo (x y) (declare (type fixnum x y)) (truncate x y))
FOO
? (foo most-negative-fixnum -1)
-536870912
0
? (truncate most-negative-fixnum -1)
536870912
0
? 

Change History (2)

comment:1 Changed 10 years ago by gb

  • Status changed from new to assigned

Note also that

? (/ most-negative-fixnum -1)

returns MOST-NEGATIVE-FIXNUM (and not (- MOST-NEGATIVE-FIXNUM)) because of this.

comment:2 Changed 10 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [13535]) Merge r13529 through r13532 (special-case divisor of -1 in %fixnum-truncate) from trunk to 1.4 branch. Fixes ticket:666.

Note: See TracTickets for help on using tickets.