octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #40668] -NA is inconsistent with other operati


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #40668] -NA is inconsistent with other operations on NA
Date: Tue, 15 Aug 2017 14:15:40 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #10, bug #40668 (project octave):

The R manual says:


On such platforms @code{NA} is represented by
the @code{NaN} value with low-word @code{0x7a2}
(1954 in decimal).


The file src/main/arithmetic.c has this:


static double R_ValueOfNA(void)
{
    /* The gcc shipping with Fedora 9 gets this wrong without
     * the volatile declaration. Thanks to Marc Schwartz. */
    volatile ieee_double x;
    x.word[hw] = 0x7ff00000;
    x.word[lw] = 1954;
    return x.value;
}


I don't think R has single precision floating point values, so there probably
isn't a single-precision NA.  I don't see one, anyway.

Originally we used that value, but it looks like it was changed, possibly to
accomodate single-precision values.

At this point, I'd be glad to drop NA values.  In more than 15 years, we've
never done anything significant with them.  It's not like all the stats
functions in Octave actually pay attention to NA.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40668>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]