Re: Infinity (to the nearest integer)

"Jonathan S. Shapiro" <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Tue, Oct 26, 2010 at 6:55 AM, Kevin Reid <kpreid-M/[email protected]> wrote:

> E generally chooses to work with only 64-bit floats as the default.
> Even if it did not, it does not follow that it is mandatory that 32-
> bit NaN is distinguished from 64-bit NaN. We already conflate all
> possible values of the I-forget-what-you-call-them extra data bits of
> the NaN.


> However, all current implementations distinguish 32-bit NaN (if they
> have 32-bit floats) from 64-bit NaN, so that would be a change.
>
> Even if we do not conflate all NaNs, it does not seem to me
> particularly terrible to choose float64 NaN as the non-integer object
> floor/0 and round/0 return when there is no integer to return. On the
> other hand, we could devise an 'integer NaN' object, which would have
> the advantage of being designed to correspond to the integer protocol
> rather than the float protocol.


I haven't tracked this topic in detail, so I may be misinterpreting Kevin's
statement above, but here is my concern:

If an implementation chooses to distinguish 32-bit and 64-bit floating point
types, it absolutely must not return the same object for NaN in the two
cases. While E is dynamically typed, it is a terrible idea to introduce
behavior that reduces our ability to statically type check portions of the
language.

_______________________________________________
e-lang mailing list
[email protected]
http://www.eros-os.org/mailman/listinfo/e-lang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.