close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Opened 11 years ago

Closed 11 years ago

#71 closed defect (fixed)

NOT-MORE-CONTAGIOUS broken for double-double-floats

Reported by: Raymond Toy Owned by: somebody
Priority: major Milestone:
Component: Core Version: 2013-01
Keywords: Cc:

Description

Here is an example of the brokenness:

(defun foo (x)
  (declare (type double-float x))
  (expt x 2w0))

(compile 'foo)

(foo 2d0)

Invalid number of arguments: 1
   [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]

This is a bug in NOT-MORE-CONTAGIOUS returning the wrong value. The power should cause result of EXPT to be a double-double-float, but the the deftransform just converts the call to a multiplication of two double-floats. This mismatch of the actual type and the derived type confuses the compiler and causes the weird error.

Change History (1)

comment:1 Changed 11 years ago by toy.raymond@…

Resolution: fixed
Status: newclosed

commit b2ee65dabba1742203e28f538eeee59da126093c Author: Raymond Toy <toy.raymond@…> Date: Thu Jan 24 20:28:09 2013 -0800

Fix ticket:71

The reader conditionals in NOT-MORE-CONTAGIOUS were incorrrectly handling the case when the second type was a double-float. It was always returning T in that case, but this is wrong if the first type is a double-double-float.

Note: See TracTickets for help on using tickets.