Skip to content
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

pow() for varmat #2546

Merged
merged 17 commits into from
Jul 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add tests for var<Matrix> pow()
  • Loading branch information
SteveBronder committed Jul 1, 2021
commit 5f21de284f3a183459b3d01810ea105ba6660740
7 changes: 4 additions & 3 deletions test/unit/math/mix/fun/pow_part3_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@ TEST(mathMixScalFun, pow_varmat) {
mat2 << 0.5, 0.5, 1.0, 1.2, 5.0, 2.0, 4.0, -2.0;
stan::test::expect_ad_matvar(f, mat1, mat2);

/*
double nan = std::numeric_limits<double>::quiet_NaN();
stan::test::expect_ad_matvar(f, mat1, nan);
stan::test::expect_ad_matvar(f, nan, mat2);


Eigen::VectorXd in1(3);
in1 << 0.5, 3.4, 5.2;
Eigen::VectorXd in2(3);
in2 << 3.3, 0.9, 2.1;
stan::test::expect_ad_matvar(f, in1, in2);
stan::test::expect_ad_matvar(f, in1, 2.0);
stan::test::expect_ad_matvar(f, 2.0, in1);
stan::test::expect_ad_vectorized_binary(f, in1, in2);
*/

stan::test::expect_ad_vectorized_matvar(f, in1, in2);

}