in reply to Re^5: NaN output
in thread NaN output

generate a NaN using only integer values ... 2**1025

Whilst that construction uses 2 integer constants, the resultant value is not an integer.

Similarly, this uses two integers in it construction, but the result is not an integer value: 1/7.

I'll repeat it. "NaN is a floating point value and thus has nothing at all to do with numerical limits of integer data types."

Like it, lump it, or obscure it. That remains true.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^7: NaN output
by syphilis (Archbishop) on Mar 06, 2014 at 08:52 UTC
    I'll repeat it.

    Oops ... was that for *my* benefit ?
    You're not telling me anything (here) that I don't already know.
    However, looking back at my posts, at no time did I state that explicitly ... though I did make a couple of attempts to make it implicitly apparent - eg a reference to "trick" and the acknowledgement that I wasn't contradicting anything you had said.

    I did think it worthy of mention (but even that's probably debatable in hindsight) that in perl you can start with integers and operate on them in such a way that you derive a NaN - because you can't do that in (eg) C, afaik.

    I also wondered whether that might have been something like the pathway that led Laurent_R to the view that you could get a NaN from integer overflow.
    But it seems Laurent_R was alert to that aspect, anyway.

    Cheers,
    Rob
      You're not telling me anything (here) that I don't already know.

      And what was there in your post that you thought that I didn't already know?

      All I said was, you cannot get NaN from integer overflow. That was, is and always will be true.

      How Laurent_R's misunderstanding came about is irrelevant; that it should be corrected isn't.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        And what was there in your post that you thought that I didn't already know?

        Absolutely nothing (except see below my sig).
        You thought I was replying to you ? ... that I was trying to correct something you had said ? ... that I was trying to improve on something you had said ?
        You thought I was writing that post (at least in part) for your own edification ?
        After all, my post appeared directly beneath yours ... and it did start with a quote from your post.

        Well, it's "none of the above". I wasn't really replying to you, nor was I attempting to correct/improve your post. I was just making a divergent and trivial follow-on comment that was triggered partly by the (quoted) remark you had made, and partly by what Laurent_R had written.
        I thought you would pick up on that. (You *can* read minds, can't you ?)
        My apologies for that - my intent would have been much clearer if I had positioned my reply beneath Laurent_R's post and been way more explicit wrt what I was trying to say. There was really no need for me to reference your post at all - it's just that it was your remark that triggered the observation.

        Shit - all that for something I've written that probably wasn't of much interest to anyone other than me, anyway.
        Oh, well ... all I can do is try to do better next time.

        Cheers,
        Rob

        PS: Actually I wasn't sure whether you were aware that you could start with a couple of IV's and generate a NaN. It's pretty trivial, so it's of little consequence whether that had occurred to you or not. It seems a bit odd to me - as someone once said, "NaN is a purely floating point concept".
        I thought you *might* find that mildly interesting in some way.
        Yeah - I assume way too much :-)