[dylan] float-invalid proposal
Bruce Mitchener <[email protected]> Sun, 5 Jan 2014 16:48:50 +0700
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <CA+esKjNy3AR_2axTYJ85M8K+Q9wh0LZ=FUsDtoWwuy-Syv58ag@mail.gmail.com> |
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