Re: Infinity (to the nearest integer)

Ben Laurie <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On 14 October 2010 04:40, Bill Frantz <[email protected]> wrote:
> On 10/8/10 at 6:58 AM, tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected] (Thomas
> Leonard) wrote:
>
>>This is a bit surprising...
>>
>>? Infinity.round()
>># value: 9223372036854775807
>>
>>? NaN.floor()
>># value: 0
>
> Perhaps in both cases introducing the idea of an Integer NaN is
> the right answer. Division by zero should produce NaN. (I can
> hear arguments for +- infinity, but is the zero + or -?)

eh?

Isn't the rule:

+ve/0 = +infinity
0/0 = indefinite
-ve/0 = -infinity

I'll buy NaN for indefinite, since most modern machinery doesn't do
indefinite, but not for the other two.

>
> But integer NaNs may be too weird.
>
> Cheers - Bill
>
> ---------------------------------------------------------------------------
> Bill Frantz        |"Web security is like medicine - trying to
> do good for
> 408-356-8506       |an evolved body of kludges" - Mark Miller
> www.periwinkle.com |
>
>
> _______________________________________________
> 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.