user3639557 user3639557 - 4 months ago 22
C++ Question

how to use digamma function in boost

I don't understand how the digamma function of boost can be used inside a program. Any example, is appreciated. I included boost

#include <boost/math/special_functions/digamma.hpp>

but the function call
, where x is a
gives the following error:

error: there are no arguments to ‘digamma’ that depend on a template
parameter, so a declaration of ‘digamma’ must be available


Here's an example:

#include <boost/math/special_functions/digamma.hpp>
#include <iostream>
int main() {
    std::cout << boost::math::digamma(3.14) << "\n";

edit: The question was edited with an error message. The error message means that the compiler didn't find a definition of digamma, because you didn't include the namespace bit boost::math::.