Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!yeshua.marcam.com!charnel.ecst.csuchico.edu!csusac!csus.edu!netcom.com!barmar
From: barmar@netcom.com (Barry Margolin)
Subject: Re: Error handling question
Message-ID: <barmarCvIIzL.1pp@netcom.com>
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
References: <1994Sep1.151605.4798@imag.fr>
Date: Fri, 2 Sep 1994 17:23:45 GMT
Lines: 21

In article <1994Sep1.151605.4798@imag.fr> dedieu@imag.fr (Eric Dedieu) writes:
>(with-minimum-float
>  (format t "format: ~A~%" 1.0E-500)
>  (list (exp -1000) (/ 1.0E-308 1E50)))
>
>getting:
>
>format: 2.0E-308
>(2.0E-308 2.0E-308)

Unfortunately, this isn't possible in general.  Common Lisp defines the
conditions that should be signalled, but doesn't require the built-in
mathematical functions to establish restart handlers to allow you to
specify alternate return values when the conditions are signalled.  It
probably would have made sense to specify that they establish a USE-VALUE
restart, but we didn't (that restart is only specified for CELL-ERROR and
its descendants).

-- 
Barry Margolin                                                barmar@netcom.com

