Hi,
Looks like the behavior or VecOps::pow
is different from std::pow
, wrt to decimal vs integer exponent.
{
auto v = ROOT::RVec<double>{3.4};
cout << ROOT::VecOps::pow(v, 2) << endl; # output: { 9 }
cout << ROOT::VecOps::pow(v, 2.0) << endl; # output: { 11.56 }
cout << std::pow(3.4, 2) << endl; # output: 11.56
cout << std::pow(3.4, 2.0) << endl; # output: 11.56
}
Is this expected?
Best,
Felipe
ROOT Version: 6.32.02
Platform: linux-x86_64
Compiler: GCC13
Danilo
2
Hi Felipe,
Thanks for the report. No, it’s not expected and an issue has been opened VecOps binary functions not using the right types · Issue #16031 · root-project/root · GitHub .
I will work on a fix in the next few days, please do not hesitate to propose one if you have some cycles to dedicated to this - it’s very simple.
Cheers,
D
Danilo
3
FYI, the fix has been merged and will propagate downstream with the forthcoming patches. Thanks again for reporting.
D
Thanks for the reply and fix!
F.
system
Closed
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.