Comments (3)
The new relevant code in Eigen is
// IEEE IEC 6059 special cases.
if ((numext::isinf)(x) || (numext::isinf)(y))
return NumTraits<RealScalar>::infinity();
if ((numext::isnan)(x) || (numext::isnan)(y))
return NumTraits<RealScalar>::quiet_NaN();
So CppAD would also need an overload for isinf(const CppAD::AD<RealScalar>&)
and isnan(const CppAD::AD<RealScalar>&)
in order to compile. I'll see if I can concoct a PR.
from cppad.
@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:
https://github.com/coin-or/CppAD/blob/master/include/cppad/example/cppad_eigen.hpp
The easiest cases to do in general are probably those that are already in the CppAD::numeric_limits; see
https://coin-or.github.io/CppAD/doc/numeric_limits.htm.
To extend this to any base type one would have to add to the base type requirements; see
https://coin-or.github.io/CppAD/doc/base_limits.htm
from cppad.
@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.
from cppad.
Related Issues (20)
- Computing the Jacobian of an ODE HOT 2
- CPPAD_DISCRETE_FUNCTION does not work through base2ad HOT 2
- How to add self defined functions to AD<Base>? HOT 8
- Using C++ conditional operators HOT 5
- AD<double> not working in Eigen with some complex function HOT 4
- Computing Derivatives of solutions of optimization Problems HOT 9
- Working with CppAD::ipopt::solve and CppADCodeGen HOT 4
- Leppov case missing in local/optimize/get_op_usage.hpp HOT 3
- Discrete coefficient sets for polynomial vary as a function of dependent variable HOT 16
- How to write the `.lp` file of a Ipopt model? HOT 6
- Linking error "undefined reference to `CppAD::local::temp_file()'" HOT 4
- solution vector is empty HOT 10
- Undefined reference to temp_file HOT 2
- ipopt and cppad tests HOT 11
- Problem to Link with CppAD and Ipopt HOT 16
- CppAD::cg::CGException: what(): GreaterThanZero cannot be called for non-parameters HOT 5
- Compiler warnings from use of bitwise '|' and '&' for bool arguments HOT 5
- Potential build mistake in third party tool in use of NDEBUG flag - CppAD compiled in Release HOT 13
- Static library for non-windows builds HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppad.