summaryrefslogtreecommitdiff
path: root/boost/math/special_functions/binomial.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/math/special_functions/binomial.hpp')
-rw-r--r--boost/math/special_functions/binomial.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/boost/math/special_functions/binomial.hpp b/boost/math/special_functions/binomial.hpp
index 8fa2e26d84..9a24fc15bb 100644
--- a/boost/math/special_functions/binomial.hpp
+++ b/boost/math/special_functions/binomial.hpp
@@ -27,12 +27,12 @@ T binomial_coefficient(unsigned n, unsigned k, const Policy& pol)
return policies::raise_domain_error<T>(
function,
"The binomial coefficient is undefined for k > n, but got k = %1%.",
- k, pol);
+ static_cast<T>(k), pol);
T result;
if((k == 0) || (k == n))
- return 1;
+ return static_cast<T>(1);
if((k == 1) || (k == n-1))
- return n;
+ return static_cast<T>(n);
if(n <= max_factorial<T>::value)
{