Boost C++ 库

...世界上最受尊敬和设计最精湛的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu, C++ 编码标准

PrevUpHomeNext

sinc_pi

#include <boost/math/special_functions/sinc.hpp>
template<class T>
BOOST_MATH_GPU_ENABLED calculated-result-type sinc_pi(const T x);

template<class T, class Policy>
BOOST_MATH_GPU_ENABLED calculated-result-type sinc_pi(const T x, const Policy&);

template<class T, template<typename> class U>
BOOST_MATH_GPU_ENABLED U<T> sinc_pi(const U<T> x);

template<class T, template<typename> class U, class Policy>
BOOST_MATH_GPU_ENABLED U<T> sinc_pi(const U<T> x, const Policy&);

计算 x 的 正弦基数函数

sinc_pi(x) = sin(x) / x

第二种形式适用于复数、四元数、八元数等。 在原点处使用泰勒级数以确保精度。

最后的 策略(Policy)参数是可选的,可用于控制函数的行为:如何处理错误,使用什么级别的精度等。有关更多详细信息,请参阅策略文档


PrevUpHomeNext