-
Notifications
You must be signed in to change notification settings - Fork 94
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
Eigen::NumTraits does not define infinity() or quiet_NaN() #139
Comments
The new relevant code in Eigen is
So CppAD would also need an overload for |
@benmwebb I am busy with other things right now. Perhaps you would like to clone the current master and make a try at what you want here. I think this is going to require additions to the following file: The easiest cases to do in general are probably those that are already in the CppAD::numeric_limits; see To extend this to any base type one would have to add to the base type requirements; see |
@bradbell OK, I made a PR which fixes this issue for me, and did my best to add suitable test cases; all tests pass on my machine. |
Trying to build this simple (and contrived) test program with latest CppAD and Eigen 3.4.0 (e.g. as packaged in Fedora 36) fails (it worked in Fedora 35, which ships Eigen 3.3.9):
Compilation fails with
This appears to be because
NumTraits<RealScalar>::infinity()
andNumTraits<RealScalar>::quiet_NaN()
in thepositive_real_hypot()
function inEigen/src/Core/MathFunctionsImpl.h
as of commit bde674164.Eigen::NumTraits
incppad/example/cppad_eigen.hpp
does not defineinfinity()
orquiet_NaN()
.The text was updated successfully, but these errors were encountered: