[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



The lossage with HAIPART doesn't happen with all fixnum args. Only with certain
ones. I might point out the following consistency. Maybe it will be helpful...

(haipart -16. 4.) => 8
(haipart -16. 5.) => 16.
(haipart -16. 6.) => -16.

(haipart -8. 3.)  => 4
(haipart -8. 4.)  => 8.
(haipart -8. 5.)  => -8.

(haipart -4. 2.)  => 2.
(haipart -4. 3.)  => 3.
(haipart -4. 4.)  => -4.

The following definition, which seems to correct the symptom, may predict
what is wrong with HAIPART's algorithm:

	(DEFUN MY-HAIPART (X Y)
	   (COND ((AND (MINUSP X) (< (HAULONG X) Y))
		  (MINUS (HAIPART X Y)))
		 (T
		  (HAIPART X Y))))

-kmp