New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use finite math. #2290
Use finite math. #2290
Conversation
ktf
commented
Feb 4, 2014
- Fixes issue with gcc 4.9.0.
- std::numeric_limit::infinity is non-finite.
A new Pull Request was created by @ktf (Giulio Eulisse) for CMSSW_7_1_X. Use finite math. It involves the following packages: DataFormats/EgammaCandidates @nclopezo, @cmsbuild, @anton-a, @thspeer, @slava77, @Degano can you please review it and eventually sign? Thanks. |
dist(std::numeric_limits<float>::infinity()), | ||
dcot(std::numeric_limits<float>::infinity()), | ||
radius(std::numeric_limits<float>::infinity()) | ||
: flags(-std::numeric_limits<float>::max()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the meaning of
(int)(-std::numeric_limits<float>::max())
We discussed this with Florian back in July and a better choice was -1 (another alternative is -9999, the "native"
undefined value for the algorithm used here https://cmssdt.cern.ch/SDT/lxr/source/RecoEgamma/EgammaTools/src/ConversionFinder.cc#461)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not have any preference. Any value would do. The advantage of
-max() is that it will behave like -inf for small numbers (i.e. X / -max
-> ~0) in case some bit of the code depended on that (which it
shouldn't, but that's another thing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change to "-1"
- Fixes issue with gcc 4.9.0. - std::numeric_limit<float>::infinity is non-finite.
I changed it for |
Just for the flags. |
This is two hours after +1 from cmsbuild. |
I wrote @nclopezo about this… Not sure what is going on... |
Hi, The comparison is not being triggered correctly. I am looking into the configuration of the jenkins rules to see why. For this one, I triggered it again manually. It is in the queue now. |
@slava77 |