Re: [dylan] float-invalid proposal
Bruce Mitchener <[email protected]> Sun, 5 Jan 2014 17:50:56 +0700
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <CA+esKjP_HyoygOfG07iAoEDrZ_wZmt89xDd_-ERaZMFa55Pj0A@mail.gmail.com> |
For what it is worth, Clozure CL signals overflow, division-by-zero, and invalid by default according to http://ccl.clozure.com/manual/chapter4.11.html - Bruce On Sun, Jan 5, 2014 at 4:48 PM, Bruce Mitchener <[email protected]>wrote: > I'm looking through some changes that prom had been working on for > handling floating point errors in the C runtime and I see that he had a > change to add: > > +define sealed class <arithmetic-domain-error> (<arithmetic-error>) > + inherited slot condition-format-string = "Arithmetic domain error"; > +end class <arithmetic-domain-error>; > + > +define sealed domain make (singleton(<arithmetic-domain-error>)); > +define sealed domain initialize (<arithmetic-domain-error>); > > And: > > +define function float-invalid () > + error(make(<arithmetic-domain-error>)) > +end function float-invalid; > > (and the corresponding exports from the dylan library / module) > > His commit comment was: > > Add runtime support for float-invalid exceptions > > This exception is thrown by libm functions, so it should > be translated to conditions just like the other ones. > > This should be properly thought through and documented > as a language extension. > > I'd like to suggest that we think this through and do this. > > Any thoughts, objections, statements of approval, etc? > > - Bruce > > _______________________________________________ hackers mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/hackers