From: Jim N. <ji...@ag...> - 2005-05-21 18:33:04
|
can anyone give me a clue what is causing the divide by zero error when i try to load or compile is file? It seems to compile and run fine on cmucl and also sbcl. You can download a copy of the program from http://www.rdrop.com/users/jimka/lisp/blocker/blocker.tar.gz and you can compile it with (load "main.lisp") If someone can give me a hint as to what's happening it would be great. thanks. ; (DEFPARAMETER *EAST* (MAKE-INSTANCE 'EAST)) ; (DEFPARAMETER *SOUTH* (MAKE-INSTANCE 'SOUTH)) ; (DEFPARAMETER *NORTH* (MAKE-INSTANCE 'NORTH)) ; (DEFPARAMETER *NORTHEAST* (MAKE-INSTANCE 'NORTHEAST)) ; (DEFPARAMETER *NORTHWEST* (MAKE-INSTANCE 'NORTHWEST)) ; (DEFPARAMETER *SOUTHEAST* (MAKE-INSTANCE 'SOUTHEAST)) ; (DEFPARAMETER *SOUTHWEST* (MAKE-INSTANCE 'SOUTHWEST)) ; (DEFPARAMETER *IDENTITY* (MAKE-INSTANCE 'NO-DIRECTION)) Wrote file /home/web/jimka/lisp/blocker/game.fas 0 errors, 1 warning ;; Loading file /home/web/jimka/lisp/blocker/game.fas ... *** - division by zero -- +------------------------------------------------------------------+ | ji...@ag... __ http://agora.rdrop.com/~jimka | +----------------------------\/------------------------------------+ | Prejudice always masquerades as rationality until it is exposed. | +------------------------------------------------------------------+ | None of us is truly free until all of us are free, with all our | | rights intact and guaranteed, including the basic right to live | | without threat or harassment. [PLAGAL] | +------------------------------------------------------------------+ |
From: Pascal J.B. <pj...@in...> - 2005-05-21 22:19:13
|
Jim Newton writes: > can anyone give me a clue what is causing the divide by > zero error when i try to load or compile is file? > It seems to compile and run fine on cmucl and also > sbcl. > > You can download a copy of the program from > http://www.rdrop.com/users/jimka/lisp/blocker/blocker.tar.gz > and you can compile it with (load "main.lisp") > > If someone can give me a hint as to what's happening > it would be great. thanks. > > > > ; (DEFPARAMETER *EAST* (MAKE-INSTANCE 'EAST)) > ; (DEFPARAMETER *SOUTH* (MAKE-INSTANCE 'SOUTH)) > ; (DEFPARAMETER *NORTH* (MAKE-INSTANCE 'NORTH)) > ; (DEFPARAMETER *NORTHEAST* (MAKE-INSTANCE 'NORTHEAST)) > ; (DEFPARAMETER *NORTHWEST* (MAKE-INSTANCE 'NORTHWEST)) > ; (DEFPARAMETER *SOUTHEAST* (MAKE-INSTANCE 'SOUTHEAST)) > ; (DEFPARAMETER *SOUTHWEST* (MAKE-INSTANCE 'SOUTHWEST)) > ; (DEFPARAMETER *IDENTITY* (MAKE-INSTANCE 'NO-DIRECTION)) > > Wrote file /home/web/jimka/lisp/blocker/game.fas > 0 errors, 1 warning > ;; Loading file /home/web/jimka/lisp/blocker/game.fas ... > *** - division by zero Using the debugger may help locate the origin of the bug. http://www.podval.org/~sds/clisp/impnotes/debugger.html Start by typing: ? RET to get a list of debugger commands, then type: :bt RET to see the backtrace and locate the exact expression that produced this error. Then with :u and :d you can move up and down the lexical frames, and you will be able to type normal lisp expressions to examine variable values. -- __Pascal Bourguignon__ http://www.informatimago.com/ Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we. -- Georges W. Bush |
From: Jim N. <ji...@rd...> - 2005-05-21 23:07:56
|
Thanks i found the problem, i think. (ATAN 0 0) returns 0.0 in CMUCL and SBCL but signals a div-by-zero error in CLISP. I checked the hyperspec and indeed it says that (ATAN 0 0) gives undefined consequences. Thanks for the information. -jim Pascal J.Bourguignon wrote: > Jim Newton writes: > >>can anyone give me a clue what is causing the divide by >>zero error when i try to load or compile is file? >>It seems to compile and run fine on cmucl and also >>sbcl. >> >>You can download a copy of the program from >>http://www.rdrop.com/users/jimka/lisp/blocker/blocker.tar.gz >>and you can compile it with (load "main.lisp") >> >>If someone can give me a hint as to what's happening >>it would be great. thanks. >> >> >> >>; (DEFPARAMETER *EAST* (MAKE-INSTANCE 'EAST)) >>; (DEFPARAMETER *SOUTH* (MAKE-INSTANCE 'SOUTH)) >>; (DEFPARAMETER *NORTH* (MAKE-INSTANCE 'NORTH)) >>; (DEFPARAMETER *NORTHEAST* (MAKE-INSTANCE 'NORTHEAST)) >>; (DEFPARAMETER *NORTHWEST* (MAKE-INSTANCE 'NORTHWEST)) >>; (DEFPARAMETER *SOUTHEAST* (MAKE-INSTANCE 'SOUTHEAST)) >>; (DEFPARAMETER *SOUTHWEST* (MAKE-INSTANCE 'SOUTHWEST)) >>; (DEFPARAMETER *IDENTITY* (MAKE-INSTANCE 'NO-DIRECTION)) >> >>Wrote file /home/web/jimka/lisp/blocker/game.fas >>0 errors, 1 warning >>;; Loading file /home/web/jimka/lisp/blocker/game.fas ... >>*** - division by zero > > > Using the debugger may help locate the origin of the bug. > > http://www.podval.org/~sds/clisp/impnotes/debugger.html > > Start by typing: > > ? RET > > to get a list of debugger commands, then type: > > :bt RET > > to see the backtrace and locate the exact expression that produced > this error. Then with :u and :d you can move up and down the lexical > frames, and you will be able to type normal lisp expressions to > examine variable values. > > |