Skip to content
Snippets Groups Projects
Commit ec5967cf authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Specialize numeric_limits for adoubles

[[Imported from SVN: r9405]]
parent 62f65a9f
No related branches found
No related tags found
No related merge requests found
#ifndef DUNE_GFE_ADOLC_NAMESPACE_INJECTIONS_HH
#define DUNE_GFE_ADOLC_NAMESPACE_INJECTIONS_HH
#include <limits>
adouble min_hack(const adouble& a, const adouble& b) {
return min(a,b);
}
......@@ -84,6 +86,21 @@ namespace std
return std::isinf(a.value());
}
/** \brief Specialization of the numeric_limits class for adouble */
template <>
struct numeric_limits<adouble> {
static adouble max() {
return numeric_limits<double>::max();
}
static adouble quiet_NaN() {
return numeric_limits<double>::quiet_NaN();
}
static constexpr bool is_integer = false;
};
}
#endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment