From 9ae1e4aeac65b4198e88b946da3683477267835a Mon Sep 17 00:00:00 2001 From: rok-cesnovar Date: Wed, 4 Dec 2019 09:47:24 +0100 Subject: [PATCH] increase tolerances in substract_vec_mat test --- test/unit/math/mix/mat/fun/subtract_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/unit/math/mix/mat/fun/subtract_test.cpp b/test/unit/math/mix/mat/fun/subtract_test.cpp index dedfde6450f..e214f403399 100644 --- a/test/unit/math/mix/mat/fun/subtract_test.cpp +++ b/test/unit/math/mix/mat/fun/subtract_test.cpp @@ -81,6 +81,9 @@ TEST(MathMixMatFun, subtract_scalar_mat) { TEST(MathMixMatFun, subtract_vec_mat) { auto f = [](const auto& x, const auto& y) { return stan::math::subtract(x, y); }; + stan::test::ad_tolerances tols; + tols.hessian_hessian_ = 5e-3; + tols.hessian_fvar_hessian_ = 5e-3; Eigen::VectorXd v5(5); v5 << 1, 2, 3, 4, 5; @@ -90,8 +93,8 @@ TEST(MathMixMatFun, subtract_vec_mat) { v5 << 1, 2, 3, 4, 5; Eigen::VectorXd rv5b(5); v5 << 2, 3, 4, 5, 6; - stan::test::expect_ad(f, v5, v5b); - stan::test::expect_ad(f, rv5, rv5b); + stan::test::expect_ad(tols, f, v5, v5b); + stan::test::expect_ad(tols, f, rv5, rv5b); } TEST(MathMixMatFun, subtract_mat_mat) {