From bb20cd7745bfce5714a6632e595b0a39f03674c9 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sat, 28 Dec 2024 22:40:43 +0800 Subject: [PATCH] Replace beta with std impl --- stan/math/prim/fun/beta.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/stan/math/prim/fun/beta.hpp b/stan/math/prim/fun/beta.hpp index 62b815707e9..2d4119725ad 100644 --- a/stan/math/prim/fun/beta.hpp +++ b/stan/math/prim/fun/beta.hpp @@ -1,9 +1,6 @@ #ifndef STAN_MATH_PRIM_FUN_BETA_HPP #define STAN_MATH_PRIM_FUN_BETA_HPP -#include -#include -#include #include #include @@ -51,8 +48,7 @@ namespace math { */ template * = nullptr> inline return_type_t beta(const T1 a, const T2 b) { - using std::exp; - return exp(lgamma(a) + lgamma(b) - lgamma(a + b)); + return std::beta(a, b); } /**