froll* not integer64-aware

Open
#5,674 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start by running the reproducible examples for frollmean(), frollsum(), and frollapply() with bit64::as.integer64() inputs. Trace these three entry points to see how integer64 values are handled, then verify that rolling results preserve the intended values and type without the shown corruption.

Written by the indexing model from the issue text.

Description

bit64 enhancement froll
library(bit64)
library(data.table)

frollmean(as.integer64(1:3), 2)
# [1]            NA 9.881313e-324 9.881313e-324

frollsum(as.integer64(1:3), 2)
# [1]            NA 1.482197e-323 2.470328e-323
structure(.Last.value, class = "integer64")
# integer64
# [1] 9218868437227407266 3                   5

frollapply(as.integer64(1:3), 2, \(x) sum(sqrt(x)))
# [1]            NA 5.366214e-162 6.993387e-162
Dominant language
R
Stars
3.9k
Forks
1.1k
Avg merge
14h 4m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Rdatatable/data.table

All issues in Rdatatable/data.table

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.