Skip to content

[treeplayer] Fix precision loss in TTree::Scan for 64-bit integers#22600

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:issue-7844
Open

[treeplayer] Fix precision loss in TTree::Scan for 64-bit integers#22600
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:issue-7844

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

The "lld" column format passed without an embedded size (e.g. via "colsize=N col=lld") was not recognized as a "long long" modifier in TTreeFormula::PrintValue, so 64-bit integer branches (e.g. ULong64_t) were evaluated as double and rounded above 2^53.

This commit fixes a off-by-one problem in the length-modifier detection to address the issue, adding also a regression test.

Closes #7844.

🤖 Done with the help of Claude Code (Claude Opus 4.8)

The `"lld"` column format passed without an embedded size (e.g. via
`"colsize=N col=lld"`) was not recognized as a `"long long"` modifier in
**TTreeFormula::PrintValue**, so 64-bit integer branches (e.g.
`ULong64_t`) were evaluated as double and rounded above 2^53.

This commit fixes a off-by-one problem in the length-modifier detection
to address the issue, adding also a regression test.

Closes root-project#7844.

🤖 Done with the help of [Claude Code](https://claude.com/claude-code) (Claude Opus 4.8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TTree::Scan() (and TTree::Draw()) issues with ULong64_t

1 participant