1 #include <stan/math/mix.hpp>
2 #include <test/unit/math/test_ad.hpp>
3
TEST(mathMixScalFun,normal_lcdf)4 TEST(mathMixScalFun, normal_lcdf) {
5 auto f = [](const double mu, const double sigma) {
6 return [=](const auto& y) { return stan::math::normal_lcdf(y, mu, sigma); };
7 };
8
9 stan::test::expect_ad(f(0.0, 1.0), -50.0);
10 stan::test::expect_ad(f(0.0, 1.0), -20.0 * stan::math::SQRT_TWO);
11 stan::test::expect_ad(f(0.0, 1.0), -5.5);
12 stan::test::expect_ad(f(0.0, 1.0), 0.0);
13 stan::test::expect_ad(f(0.0, 1.0), 0.15);
14 stan::test::expect_ad(f(0.0, 1.0), 1.14);
15 stan::test::expect_ad(f(0.0, 1.0), 3.00);
16 stan::test::expect_ad(f(0.0, 1.0), 10.00);
17 stan::test::expect_ad(f(-1.0, 2.0), 1.50);
18 stan::test::expect_ad(f(2.0, 1.0), 0.50);
19 }
20