Skip to content

test() distinguishes NA, NaN in vectors - #7864

Open
MichaelChirico wants to merge 1 commit into
masterfrom
test-na-nan
Open

test() distinguishes NA, NaN in vectors#7864
MichaelChirico wants to merge 1 commit into
masterfrom
test-na-nan

Conversation

@MichaelChirico

@MichaelChirico MichaelChirico commented Jul 30, 2026

Copy link
Copy Markdown
Member

NB: targeting #7863

Closes #7853

  1. test(0, data.table(a=NA_real_), data.table(a=NaN)) currently passes. I'll mark that for follow-up since, IINM, it will require a breaking change to all.equal.data.table().
  2. froll.Rraw is not currently passing. @jangorecki could you PTAL and see if we should just update the tests or if this is exposing some unintended behavior?

@MichaelChirico

Copy link
Copy Markdown
Member Author

Testing out the new stacking feature on GitHub. Locally, I'm still using jj to manage chains.

Let's see how it works! Ideally they work fluidly together.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
  • HEAD=test-na-nan much slower for transform improved in #5493
    Comparison Plot

Generated via commit aed009e

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 3 minutes and 13 seconds
Installing different package versions 48 seconds
Running and plotting the test cases 5 minutes and 35 seconds

@jangorecki

jangorecki commented Jul 31, 2026

Copy link
Copy Markdown
Member

From R-devel ultimate conclusion was to not depend on "NA vs NaN" -ness as it is platform dependent,

*) As Ista Zahn said (there, on R-devel): See ?NA, which says

"Numerical computations using ‘NA’ will normally result in ‘NA’: a
possible exception is where ‘NaN’ is also involved, in which case
either might result"

and as seen in this link, compiler flag dependent too.
#3353

we could possibly add one more section to froll manual explaining that matter.

Base automatically changed from self-test to master August 5, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test() doesn't distinguish plain NA_real_, NaN

2 participants