本文整理汇总了C++中SymEngine::gamma方法的典型用法代码示例。如果您正苦于以下问题:C++ SymEngine::gamma方法的具体用法?C++ SymEngine::gamma怎么用?C++ SymEngine::gamma使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SymEngine
的用法示例。
在下文中一共展示了SymEngine::gamma方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: add
7.336249966045},
{add(add(sinh(one), add(cosh(one), add(tanh(one), coth(one)))),
sech(r3)),
5.773239267559},
{sub(add(add(asinh(r4), add(acosh(r4), add(atanh(r3), acoth(r4)))),
sech(r4)),
acsch(r4)),
4.825120290814},
{SymEngine::abs(log(div(pi, mul(E, integer(2))))), 0.548417294710},
{SymEngine::atan2(r1, neg(r2)), 2.08867384922582},
{mul(pi, mul(E, EulerGamma)), 4.92926836742289},
{pow(mul(EulerGamma, r4), integer(8)), 4813.54354505117582},
{mul(EulerGamma, integer(10)), 5.7721566490153286},
{max({r2, r1}), 0.841470984808},
{min({add(r1, r4), r2}), 0.479425538604},
{gamma(div(integer(4), integer(3))), 0.892979511569249211},
{loggamma(div(integer(7), integer(2))), 1.200973602347074224},
{loggamma(pi), 0.82769459232343710152},
{add(asech(div(one, integer(2))), real_double(0.1)), 1.41695789692482},
{r5, 0.841470984807897},
};
for (unsigned i = 0; i < vec.size(); i++) {
double val = eval_double(*vec[i].first);
std::cout.precision(12);
std::cout << vec[i].first->__str__() << " ~ " << val << std::endl;
REQUIRE(::fabs(val - vec[i].second) < 1e-12);
}
for (unsigned i = 0; i < vec.size(); i++) {
double val = eval_double_single_dispatch(*vec[i].first);