Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Francesco Brarda
stan-math-petsc
Commits
e3df4243
Commit
e3df4243
authored
6 years ago
by
Ben
Browse files
Options
Download
Email Patches
Plain Diff
Added the last untested combinations of var/double to the integrate_1d tests (Issue #1022)
parent
de0b7f34
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/unit/math/rev/arr/functor/integrate_1d_test.cpp
+20
-0
test/unit/math/rev/arr/functor/integrate_1d_test.cpp
with
20 additions
and
0 deletions
+20
-0
test/unit/math/rev/arr/functor/integrate_1d_test.cpp
View file @
e3df4243
...
...
@@ -274,6 +274,26 @@ TEST(StanMath_integrate_1d, TestDerivatives_zero_crossing) {
-
19.06340613646808
,
21.41380852375568
);
}
TEST
(
StanMath_integrate_1d
,
TestDerivatives_var_right_endpoint_var_params
)
{
// Zero crossing integral + test x_r + vars at right endpoint
using
stan
::
math
::
var
;
test_derivatives
<
double
,
var
,
var
>
(
f3
{},
-
1.0
,
1.0
,
{
0.5
,
1.75
,
3.9
},
{
2.5
,
3.0
},
{},
2.350402387287579
+
2.0
*
pow
(
0.5
,
2.5
)
+
4.0
*
pow
(
1.75
,
3.0
)
+
4.0
*
3.9
,
{
5
*
pow
(
0.5
,
1.5
),
12
*
1.75
*
1.75
,
4.0
},
0.0
,
21.41380852375568
);
}
TEST
(
StanMath_integrate_1d
,
TestDerivatives_var_left_endpoint_var_params
)
{
// Zero crossing integral + test x_r + var at left endpoint
using
stan
::
math
::
var
;
test_derivatives
<
var
,
double
,
var
>
(
f3
{},
-
1.0
,
1.0
,
{
0.5
,
1.75
,
3.9
},
{
2.5
,
3.0
},
{},
2.350402387287579
+
2.0
*
pow
(
0.5
,
2.5
)
+
4.0
*
pow
(
1.75
,
3.0
)
+
4.0
*
3.9
,
{
5
*
pow
(
0.5
,
1.5
),
12
*
1.75
*
1.75
,
4.0
},
-
19.06340613646808
,
0.0
);
}
TEST
(
StanMath_integrate_1d
,
TestDerivatives_no_param_vars
)
{
// No param vars
using
stan
::
math
::
var
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help