Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sander, Oliver
dune-gfe
Commits
ec5967cf
Commit
ec5967cf
authored
11 years ago
by
Oliver Sander
Committed by
sander
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Specialize numeric_limits for adoubles
[[Imported from SVN: r9405]]
parent
62f65a9f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/adolcnamespaceinjections.hh
+17
-0
17 additions, 0 deletions
dune/gfe/adolcnamespaceinjections.hh
with
17 additions
and
0 deletions
dune/gfe/adolcnamespaceinjections.hh
+
17
−
0
View file @
ec5967cf
#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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment