[tree] Fix long64 tree index losing precision on 64-bit long double platforms and enable forgotten test#19741
Conversation
|
It seems Windows/MacOS still do not like big long64 values... :s |
Test Results 22 files 22 suites 3d 14h 52m 56s ⏱️ For more details on these failures, see this check. Results for commit 4626182. ♻️ This comment has been updated with latest results. |
cba0d3d to
79c9f94
Compare
|
@guitargeek since your last PRs touch some tree code, could you maybe check if Claude can also help with reenabling this broken test? |
The agentic Claude Code workflow that I set up runs in a sandboxed Linux VM (I want to use it in auto mode without risking the files on my workstation), but I asked it to attempt to fix it anyway by providing the CI logs. The change it suggests looks harmless, let's see if it works! |
|
Thanks a lot !! |
…latforms The conditional `long64major ? GetLong64() : GetAndRangeCheck()` mixes Long64_t and LongDouble_t, so the exact value was promoted through long double regardless of branch. This rounded large values where long double is 64-bit (macOS arm64, Windows), making roottest-root-tree-index-indexl64 fail there while passing on Linux. Fix this with an explicit `static_cast<Long64_t>(ret)`. 🤖 Done with the help of [Claude Code](https://claude.com/claude-code) (Claude Opus 4.8)
guitargeek
left a comment
There was a problem hiding this comment.
Thanks a lot for re-adding the test! The fix that I needed to apply was just to add the static_cast<Long64_t>(ret) to ensure the ternary expression has the right type.
|
Thaanks a lot @guitargeek , could you backport to 6.40? Fyi @amete |
|
/backport to 6.40 |
|
Preparing to backport PR #19741 to branch 6.40 requested by guitargeek |
|
This PR has been backported to branch 6.40: #22607 |
This is a fixup of #19561 that was supposed to fix #19560
A test was created there, but it was forgotten to add it to the CMakeLists. As a consequence, the CI looked green but the test was not running at all, and it was actually broken.
This PR reenables the test as well as fixes the TTree code to unbreak the test.