From: Sunil Mishra
Subject: Help with floats
Date: 
Message-ID: <efyogqfms1n.fsf@hustle.cc.gatech.edu>
Hi,

I am currently in the process of constructing a lispworks 3.2 interface to
LAPACK on an IRIX 6.3 box. I have managed to put together an interface that
appears to be (mostly) working. The transcript below should demonstrate why
it's not wholly functional...

The test function attempts to calculate the eigenvalues of a matrix. The
source is also given below. I seem to be getting reasonable values. They
are merely unprintable, by my estimation due to an underflow problem. Do
any of you out there have any suggestions for locating/correcting these
problems, so that the arrays become printable without having to rely on a
special purpose function? Or is this something I ought to take up with
Harlequin, the lispworks vendor?

Thanks!

Sunil

----------------------------------------

(defun test ()
  (ssyevx
   (system:in-static-area
    (make-array '(5 5)
		:initial-contents '((1.0 0.0 1.0 0.0 0.0)
				    (0.0 1.0 0.0 0.0 1.0)
				    (1.0 0.0 1.0 0.0 0.0)
				    (0.0 0.0 0.0 0.0 0.0)
				    (0.0 1.0 0.0 0.0 1.0))
		:element-type 'single-float))))

----------------------------------------

LAPACK 31 > (test)
Break.
  1 (continue) Return from break.
  2 (abort) Return to level 0.
  3 Return to top-level loop.
  4 Return from multiprocessing.

Type :c followed by a number to proceed or type :? for other options

LAPACK 32 : 1 > :c
#(0.0 295639300000000000000000000000000000.0E-40 29563930000.0E-15 1.9999704 1.9999704)
#2A((0.0 0.0 0.0 0.0 0.0) (0.0 0.0 0.0 0.0 0.0) (0.0 0.0 0.0 0.0 0.0) (0.0 0.0 0.0 0.0 0.0) (0.0 0.0 0.0 0.0 0.0))

LAPACK 33 > (setq eigv *)
#(0.0 
Error: Arithmetic-error in INTEGER-DECODE-FLOAT of (+1E++0 #| +1E++0 is single-float plus-infinity |#): Cannot decode infinities
  1 (continue) Return a value to use
  2 (abort) Return to level 0.
  3 Return to top-level loop.
  4 Return from multiprocessing.

Type :c followed by a number to proceed or type :? for other options

LAPACK 34 : 1 > :a
LAPACK 35 > eigv
#(0.0 
Error: Arithmetic-error in INTEGER-DECODE-FLOAT of (+1E++0 #| +1E++0 is single-float plus-infinity |#): Cannot decode infinities
  1 (continue) Return a value to use
  2 (abort) Return to level 0.
  3 Return to top-level loop.
  4 Return from multiprocessing.

Type :c followed by a number to proceed or type :? for other options

LAPACK 36 : 1 > :a
LAPACK 37 > (loop for n across eigv
      do (print (round n)))
0 
0 
0 
2 
2 
NIL

----------------------------------------