You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[treeplayer] Report integer Scan values that cannot be printed exactly
Even evaluated through long double, an integer column can still exceed
the accumulator's exactly-representable range: above 2^53 where long
double is merely a 64-bit double (e.g. macOS ARM), or beyond 2^64 for
results that overflow. As explained in the preceding commit, this cannot
be fixed without changing TTreeFormula's frozen floating-point
arithmetic, so it is a genuine known limitation, not a bug to work
around -- but it must not pass silently.
TTreeFormula::PrintValue now emits an error whenever the value it is
about to print as an integer has reached the point where the long double
accumulator can no longer hold every integer exactly, so the printed
digits may be rounded. The diagnostic is deliberately a kError, issued
for every offending value with no deduplication: silently printing a
wrong integer is precisely the trap we want to surface as loudly as
possible, even on a many-row Scan.
The threshold check is inclusive (>= 2^digits) on purpose: a rounded
result can land back exactly on the threshold (e.g. 2^53 + 1 -> 2^53 in
a 53-bit type), and an inclusive comparison avoids missing those.
Closes#7844.
🤖 Done with the help of [Claude Code](https://claude.com/claude-code) (Claude Opus 4.8)
0 commit comments