[boost::math]binomial_coefficient compile error

Hi this code gives a compile error. #include <iostream> #include <boost/math/special_functions/binomial.hpp> using namespace std; int main(){ cout << boost::math::binomial_coefficient(10,1) << endl; } binom.cpp:8: error: no matching function for call to ‘binomial_coefficient(int, int)’ what is that I am missing? thanks suresh -- R Suresh Kumar, http://www.ee.ucr.edu/~sramachandranna Sarve bhavantu sukinaha (May everyone be happy) Sarve santu niramiyaha (May everyone be without affliction) Sarve bhadrani pashyantu (May everyone see only goodness) Ma kashchit dukha bhak bhavet (Let none be the victim of suffering)

Hi this code gives a compile error. #include <iostream> #include <boost/math/special_functions/binomial.hpp> using namespace std; int main(){ cout << boost::math::binomial_coefficient(10,1) << endl; } binom.cpp:8: error: no matching function for call to ‘binomial_coefficient(int, int)’ what is that I am missing? thanks suresh -- R Suresh Kumar, http://www.ee.ucr.edu/~sramachandranna Sarve bhavantu sukinaha (May everyone be happy) Sarve santu niramiyaha (May everyone be without affliction) Sarve bhadrani pashyantu (May everyone see only goodness) Ma kashchit dukha bhak bhavet (Let none be the victim of suffering) -- R Suresh Kumar, http://www.ee.ucr.edu/~sramachandranna Sarve bhavantu sukinaha (May everyone be happy) Sarve santu niramiyaha (May everyone be without affliction) Sarve bhadrani pashyantu (May everyone see only goodness) Ma kashchit dukha bhak bhavet (Let none be the victim of suffering)

what is that I am missing?
An evaluation type - the function is a template that returns a real-value, *not* an integer (that's too prone to error and overflow), so for example: boost::math::binomial_coefficient<double>(10, 1) would do the trick and return the result as a double. HTH, John.
participants (2)
-
John Maddock
-
Suresh Kumar