search for: masdist

Displaying 1 result from an estimated 1 matches for "masdist".

Did you mean: massdist
1999 Oct 08
1
floor(NaN) problem fixed in massdist.c (PR#291)
..."massdist", x = as.double(x), nx = N, xlo = as.double(lo), xhi = as.double(up), y = double(2 * n), ny = as.integer(n), NAOK = has.na, PACKAGE = "base")$y y[1] and y[2] should be 0 and 0 but both of them became NaN after this statement. So I looked at src/appl/masdist.c with a debugger. The bug is caused by floor(). On Alpha/Linux, floot(NaN) returns 0. x[i] in the following code is the list passed from the above statement in density(). The array x contains a couple of NaN. When x[i] is NaN, xpos become NaN. Then ix = floor(xpos) returns an unexpected resu...