Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!howland.erols.net!spool.mu.edu!torn!kwon!watserv3.uwaterloo.ca!news
From: Kevin Mayall <kmayall@uwaterloo.ca>
Subject: = function
Content-Type: text/plain; charset=us-ascii
Message-ID: <32F5457C.2B4B@uwaterloo.ca>
Sender: news@watserv3.uwaterloo.ca
Nntp-Posting-Host: cnts2p12.uwaterloo.ca
Reply-To: kmayall@uwaterloo.ca
Content-Transfer-Encoding: 7bit
Organization: University of Waterloo
Mime-Version: 1.0
Date: Mon, 3 Feb 1997 01:55:08 GMT
X-Mailer: Mozilla 3.0 (Win95; I)
Lines: 36

I'm getting a result from the = function which, after milling through
CLtL2 and Allegro's Help files, I still don't understand.  I am giving =
the results of two expressions which evaluate to 1/5 and 0.2.  Yet it
returns nil.

Results from the stepper:
4:     (= (SLOPE V1 V2) (SLOPE V1 V3))
5:      (SLOPE V1 V2)
6:       V1
6:       returns: #<VERTEX #xEB8354>
6:       V2
6:       returns: #<VERTEX #xEB8390>
5:      returns: 1/5
5:      (SLOPE V1 V3)
6:       V1
6:       returns: #<VERTEX #xEB8354>
6:       V3
6:       returns: #<VERTEX #xEB8720>
5:      returns: 0.2
4:     returns: NIL

Yet, when evaluated in the toploop window, (= 1/5 0.2) returns T.
I don't understand this.

The slope function is defined as:
(defmethod slope ((p1 Point) (p2 Point)) 
   (if (zerop (- (x p2) (x p1))) most-positive-single-float
      (/ (- (y p2) (y p1)) (- (x p2) (x p1)))))

and Vertex is a subclass of Point, with no method defined for Vertices.

Coercing the result of slope to 'float doesn't work either.

Thanks in advance for your help..........

	Kevin
