[Openmcl-devel] Printing/Reading floats

Raymond Wiker Raymond.Wiker at fast.no
Mon Mar 17 09:54:16 PST 2003


Raymond Wiker writes:
 > (defun hypothetical-integer-encode-float (sig exp sign)
 >   (* sign (scale-float (float sig) exp)))
 > 
 >         (Actually, I just tried this, in SBCL, with pi - didn't look
 > to good :-)

        Did some more checking... if I replace (float sig) with 
(float sig 0d0) (or (coerce sig 'double-float)), things look better.

        Hum. Maybe

(defun hypothetical-integer-encode-float (sig exp sign 
                                          &optional (prototype 0.0))
  (* sign (scale-float (float sig prototype) exp)))

-- 
Raymond Wiker                        Mail:  Raymond.Wiker at fast.no
Senior Software Engineer             Web:   http://www.fast.no/
Fast Search & Transfer ASA           Phone: +47 23 01 11 60
P.O. Box 1677 Vika                   Fax:   +47 35 54 87 99
NO-0120 Oslo, NORWAY                 Mob:   +47 48 01 11 60

Try FAST Search: http://alltheweb.com/


_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel



More information about the Openmcl-devel mailing list