piranha
0.10
|
Specialisation of the implementation of piranha::math::binomial() for floating-point and arithmetic arguments. More...
#include <piranha/binomial.hpp>
Public Types | |
using | result_type = typename std::common_type< T, U >::type |
Result type for the call operator. More... | |
Public Member Functions | |
result_type | operator() (const T &x, const U &y) const |
Call operator. More... | |
Specialisation of the implementation of piranha::math::binomial() for floating-point and arithmetic arguments.
This specialisation is activated when both arguments are C++ arithmetic types and at least one argument is a floating-point type.
Definition at line 149 of file binomial.hpp.
using piranha::math::binomial_impl< T, U, binomial_fp_arith_enabler< T, U > >::result_type = typename std::common_type<T, U>::type |
Result type for the call operator.
The result type is the widest floating-point type among T
and U
.
Definition at line 154 of file binomial.hpp.
|
inline |
Call operator.
The implementation, accepting any real finite value for x
and y
, is described in http://arxiv.org/abs/1105.3689/. Note that, since the implementation uses floating-point arithmetics, the result will - in general - be inexact, even if both x
and y
represent integral values.
x | top argument. |
y | bottom argument. |
x
choose y
.std::invalid_argument | if at least one argument is not finite. |
Definition at line 169 of file binomial.hpp.