如何在boost中使用双伽马函数
how to use digamma function in boost
我不明白boost的digamma函数如何在程序中使用。任何例子,是赞赏的。我包含了boost
#include <boost/math/special_functions/digamma.hpp>
,但函数调用digamma(x)
,其中x是double
给出以下错误:
error: ' digamma '没有依赖于模板的参数参数,因此必须声明' digamma '(-fpermissive)
下面是一个例子:http://cpp.sh/7bdu
#include <boost/math/special_functions/digamma.hpp>
#include <iostream>
int main() {
std::cout << boost::math::digamma(3.14) << "n";
}
edit:问题被编辑时出现错误消息。这个错误信息意味着编译器没有找到digamma
的定义,因为您没有包含命名空间位boost::math::
。
相关文章:
- 构造函数/函数声明参数列表中的统一初始化
- 如何区分宏函数和函数函数而没有任何歧义?
- 在c++中为链接列表创建复制构造函数/函数
- 如何声明模板函数,以便可以在类构造函数/函数中传递
- 在C 中,如何调用构造函数函数
- bool值不在腔函数函数中重新调整false,c
- 用参数调用函数/函数,而不是参数
- 为什么在破坏函数函数中fstream Zero ernno
- 采用nulltpr_t的构造函数:函数定义不声明参数
- 调用函数函数从功能指针向量向量的函数指针
- Main 不能调用函数:函数未在此范围内声明
- 如何调用传递的函数(函数 ptr 作为参数传递给函数)
- 构造函数:函数不接受3个参数
- 如何理解函数函数参数中的星号(*)?
- 指向函数/函数表的指针
- LNK2019:函数"函数"中'symbol'引用未解析的外部符号;致命错误 LNK1120:1 未解析的外部
- 将函数函数传递给带有函数参数的std::线程.这可能吗?
- 在对象上调用特定的函数(函数指针)
- unordered_map自定义哈希/相等函数 - 函数不会被调用
- 编译器如何处理函数函数中重载的函数调用操作符