[Oberon] Modulus on negative number
Jan de Kruyf
jan.de.kruyf at gmail.com
Wed May 17 09:50:51 CEST 2017
>„NaN“ is a special value for floating point numbers defined in IEEE 754.
In Oberon, DIV and MOD are defined on positive INTEGERs. Hence, no "NaN".
Is that defined in the hardware Joerg?
Since The language specifies for O2 : that an integer is between
MIN(INTEGER) and MAX(INTEGER).
For O7 it is not defined but there is an absolute value function in section
ABS(x) x: numeric type | type of x | absolute value.
>Do the NaNs depend on the hardware support?
And Texts.Mod has a routine that prints them out as "NaN"
Texts.WriteReal* (VAR W: Writer; x: REAL; n: INTEGER);
On Wed, May 17, 2017 at 8:54 AM, Skulski, Wojciech <
skulski at pas.rochester.edu> wrote:
> >> 1. Does Oberon support NaN? If not then maybe it should?
> >> 2. Could the "undefined" become "defined as NaN" in all numerical cases
> which are now undefined?
> >„NaN“ is a special value for floating point numbers defined in IEEE 754.
> In Oberon, DIV and MOD are defined on positive INTEGERs. Hence, no "NaN".
> This is why I said "somewhat related". I understand the integer case, but
> how about the floating point?
> Do the NaNs depend on the hardware support? Is it wise to specify them in
> the language?
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon