Bugs item #652470, was opened at 2002-12-12 04:44
Message generated for change (Settings changed) made by crategus
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104933&aid=652470&group_id=4933
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Lisp Core
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Stavros Macrakis (macrakis)
Assigned to: Nobody/Anonymous (nobody)
Summary: Pickapart error (due to MEMSIMILAR)
Initial Comment:
The Pickapart of a rather messy formula (irrelevant here)
gives:
Error: ((RAT SIMP) 1 9) is not of type NUMBER.
The problem is in the MEMSIMILAR routine:
(DEFUN MEMSIMILAR (ITEM1 ITEM2 ITEM2EV)
(COND ((EQUAL ITEM2EV 0) NIL)
((ALIKE1 ITEM1 ITEM2EV) ITEM2)
(T (LET ((ERRORSW T) R)
(SETQ R (CATCH 'ERRORSW (DIV
ITEM2EV ITEM1)))
(AND (not (zerop1 r))
;(MNUMP R) (NOT (ZEROP R))
;;; ^^^ NO! MNump includes rats and bigfloats
(DIV ITEM2 R))))))
----------------------------------------------------------------------
>Comment By: Dieter Kaiser (crategus)
Date: 2009-11-08 22:02
Message:
Fixed in outmis.lisp revision 1.21.
Closing this bug report as fixed.
Dieter Kaiser
----------------------------------------------------------------------
Comment By: Dieter Kaiser (crategus)
Date: 2009-11-08 19:13
Message:
That is the code in memsimiliar which causes the problem:
(and (mnump r) ; Check for Maxima number
(not (zerop r)) ; Test a CL number against zero
(div item2 r)) ; Divide a tow Maxima numbers
The test against zero is wrong. We have to use zerop1. That might be the
correct code:
(and (mnump r) ; Check for Maxima number
(not (zerop1 r)) ; Test a Maxima number against zero
(div item2 r)) ; Divide a tow Maxima numbers
The problem is, I have no example to trigger the bug. But the code needs
obviously the test zerop1.
Dieter Kaiser
----------------------------------------------------------------------
Comment By: Robert Dodier (robert_dodier)
Date: 2006-07-01 07:01
Message:
Logged In: YES
user_id=501686
Bug is presumably still present in 5.9.3cvs because
MEMSIMILAR in src/outmis.lisp still calls MNUMP. Not clear
how to patch MEMSIMILAR, not clear how to test if patch works.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104933&aid=652470&group_id=4933
|