[M3devel] FloatMode
Tony Hosking
hosking at cs.purdue.edu
Tue Jan 12 19:33:59 CET 2010
On 11 Jan 2010, at 23:55, Jay K wrote:
> I thought FloatMode was only related to floating point.
> So I looked:
>
> "IntOverflow" = an integer operation produced a result whose
> absolute value is too large to be represented.
>
> "IntDivByZero" = integer "DIV" or "MOD" by zero.
> \end{quote}
>
>
> This part of it should be easy to implement for all architectures.
> The entire thing probably isn't too difficult either on many platforms either.
>
> However...I was surprised by this.
> I thought the real "intent" in Modula-3 to not have this be configurable
> and endeavor for overflow and divide by zero to always immediately
> raise an exception? The only "out" is that it might not get implemented on some platforms for some reason?
Yes, that's the issue.
> For the floating point stuff:
>
> Probably like other per-platform code, this should be done in #ifdefed C.
Agreed... does that mean you will bite? ;-)
>
> http://msdn.microsoft.com/en-us/library/e9b52ceh(VS.80).aspx
> http://kernel.org/doc/man-pages/online/pages/man3/fetestexcept.3.html
> etc.
>
> - Jay
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100112/522b2ac7/attachment-0002.html>
More information about the M3devel
mailing list