Open aaduszki opened 3 years ago
This is a duplicate of https://sft.its.cern.ch/jira/browse/ROOT-8009
@pcanal does https://github.com/root-project/root/pull/6740 close the issue? I think you linked it, but as it was already merged, it does not automatically close this issue.
The test @aadduszki wrote still fails on master:
------------------------------------------------------------------
| Welcome to ROOT 6.25/01 https://root.cern |
| (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Jun 08 2021, 21:53:04 |
| From heads/master@v6-25-01-1189-g1ca221f010 |
| With |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
Processing test_tree.cpp...
Written to tree: 1617047019150033926
Read from tree: 1617047019150033926 (correct)
TTree::Scan("x");
Expected output: 1617047019150033926
****************************************
* Row * x *
****************************************
* 0 * 1617047019150033920 *
****************************************
TTree::Scan("x-1617047019150033925");
Expected output: 1
****************************************
* Row * x-1617047019150033925 *
****************************************
* 0 * 0 *
****************************************
TTree::Scan("x-1617047019150033000");
Expected output: 926
****************************************
* Row * x-1617047019150033000 *
****************************************
* 0 * 1024 *
****************************************
I use TTree objects with branches storing ULong64_t variables. When I use Tree::Scan() to printi these variables and perform mathematical operations, I encounter unexpected results.
I wrote a following program to demonstrate the issue:
The program:
This is output I obtained with 6.22/08 in Linux:
I encountered similar issues when trying to plot the values with TTree::Draw().
It seems to me that the values are rounded... perhaps casted to double? Is there any way to avoid it?