|
Boost Users : |
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-06-10 21:55:38
AMDG
Sakaie, Ken wrote:
>
> I did the following 'hello-world'-level test of the factorial function
> and get the following error.
>
> > cat test.cpp
>
> #include "boost/math/special_functions/factorials.hpp"
> int main()
> {
> unsigned int i = 6;
> printf("%d\n", boost::math::factorial(i));
> }
>
Here's one way:
#include "boost/math/special_functions/factorials.hpp"
int main()
{
unsigned int i = 6;
printf("%d\n",
static_cast<unsigned>(boost::math::factorial<double>(i)));
}
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net