如果没有定义tgamma()函数怎么办?

编程入门 行业动态 更新时间:2024-10-28 20:28:03
本文介绍了如果没有定义tgamma()函数怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我尝试使用标准库中的 tgamma()。当我尝试编译,我得到错误消息:

I am trying to use tgamma() from the standard library. When I try to compile, I get the error message:

调用未定义的函数tgamma

Call to undefined function tgamma

我有指令 #include< cmath> 。我使用Embarcadero C ++ Builder XE3,声称支持C ++ 11标准。可能是我的问题,以及如何解决?

I have the directive #include <cmath>. I use Embarcadero C++ Builder XE3, which claims to support C++11 standards. What could be my problem, and how to fix it?

推荐答案

Boost 包含 tgamma 功能。

#include <boost/math/special_functions/gamma.hpp> ... double rootPi = boost::math::tgamma<double>(0.5);

当然,你可以随时切换到不同的编译器,例如 gcc 。

Of course, you can always switch to a different compiler, like gcc.

更多推荐

如果没有定义tgamma()函数怎么办?

本文发布于:2023-07-09 14:52:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1087114.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如果没有   函数   定义   tgamma

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!