标准库标头 <cmath>
来自cppreference.com
此标头原作为 <math.h> 存在于 C 标准库。
此头文件是数值库的一部分。
类型 | |
float_t (C++11) |
至少和 float 一样宽的最高效浮点数类型 (typedef) |
double_t (C++11) |
至少和 double 一样宽的最高效浮点数类型 (typedef) |
宏 | |
(C++11)(C++11) |
分别指示 float、double 和 long double 的上溢值 (宏常量) |
(C++11) |
求值为正无穷大或保证使 float 上溢的值 (宏常量) |
(C++11) |
求值为 float 类型的静默 NAN (宏常量) |
(C++11)(C++11)(C++11) |
定义常用数学函数所用的错误处理机制 (宏常量) |
分类 | |
(C++11)(C++11)(C++11)(C++11)(C++11) |
指示浮点数类别 (宏常量) |
函数 | |
基本运算 | |
(C++11)(C++11) |
浮点数的绝对值(|x|) (函数) |
(C++11)(C++11) |
浮点数除法运算的余数 (函数) |
(C++11)(C++11)(C++11) |
除法运算的有符号余数 (函数) |
(C++11)(C++11)(C++11) |
除法运算的有符号余数和最后三个二进制位 (函数) |
(C++11)(C++11)(C++11) |
混合的乘加运算 (函数) |
(C++11) |
两个浮点数的较大者 (函数) |
(C++11)(C++11)(C++11) |
两个浮点数的较小者 (函数) |
(C++11)(C++11)(C++11) |
两个浮点数的正数差(max(0, x-y)) (函数) |
(C++11)(C++11)(C++11) |
非数(NaN) (函数) |
线性插值 | |
(C++20) |
线性插值函数 (函数) |
指数函数 | |
(C++11)(C++11) |
返回 e 的给定次幂(ex) (函数) |
(C++11)(C++11)(C++11) |
返回 2 的给定次幂(2x) (函数) |
(C++11)(C++11)(C++11) |
返回 e 的给定次幂减 1(ex-1) (函数) |
(C++11)(C++11) |
计算自然(以 e 为底)对数(ln(x)) (函数) |
(C++11)(C++11) |
计算常用(以 10 为底)对数(log10(x)) (函数) |
(C++11)(C++11)(C++11) |
给定数值的以 2 为底的对数(log2(x)) (函数) |
(C++11)(C++11)(C++11) |
1 加上给定数值的自然(以 e 为底)对数(ln(1+x)) (函数) |
幂函数 | |
(C++11)(C++11) |
求某数的给定次幂(xy) (函数) |
(C++11)(C++11) |
计算平方根(√x) (函数) |
(C++11)(C++11)(C++11) |
计算立方根(3√x) (函数) |
(C++11)(C++11)(C++11) |
计算斜边(弦)长 √x2 +y2 与 √x2 +y2 +z2 (C++17 起) (函数) |
三角函数 | |
(C++11)(C++11) |
计算正弦(sin(x)) (函数) |
(C++11)(C++11) |
计算余弦(cos(x)) (函数) |
(C++11)(C++11) |
计算正切(tan(x)) (函数) |
(C++11)(C++11) |
计算反正弦(arcsin(x)) (函数) |
(C++11)(C++11) |
计算反余弦(arccos(x)) (函数) |
(C++11)(C++11) |
计算反正切(arctan(x)) (函数) |
(C++11)(C++11) |
反正切,用符号确定象限 (函数) |
双曲函数 | |
(C++11)(C++11) |
计算双曲正弦(sinh(x)) (函数) |
(C++11)(C++11) |
计算双曲余弦(cosh(x)) (函数) |
(C++11)(C++11) |
计算双曲正切(tanh(x)) (函数) |
(C++11)(C++11)(C++11) |
计算反双曲正弦(arsinh(x)) (函数) |
(C++11)(C++11)(C++11) |
计算反双曲余弦(arcosh(x)) (函数) |
(C++11)(C++11)(C++11) |
计算反双曲正切(artanh(x)) (函数) |
误差与伽马函数 | |
(C++11)(C++11)(C++11) |
误差函数 (函数) |
(C++11)(C++11)(C++11) |
补误差函数 (函数) |
(C++11)(C++11)(C++11) |
gamma 函数 (函数) |
(C++11)(C++11)(C++11) |
gamma 函数的自然对数 (函数) |
临近整数的浮点数运算 | |
(C++11)(C++11) |
不小于给定值的最接近整数 (函数) |
(C++11)(C++11) |
不大于给定值的最接近整数 (函数) |
(C++11)(C++11)(C++11) |
绝对值不大于给定值的最接近整数 (函数) |
(C++11)(C++11)(C++11)(C++11)(C++11)(C++11)(C++11)(C++11)(C++11) |
最接近整数,中间情况下向远离零舍入 (函数) |
(C++11)(C++11)(C++11) |
使用当前舍入模式的最接近整数 (函数) |
(C++11)(C++11)(C++11)(C++11)(C++11)(C++11)(C++11)(C++11)(C++11) |
使用当前舍入模式的最接近整数 若结果有别则有异常 (函数) |
浮点数操纵函数 | |
(C++11)(C++11) |
将数分解为有效数字和以 2 为底的指数 (函数) |
(C++11)(C++11) |
将数乘以 2 的整数次幂 (函数) |
(C++11)(C++11) |
分解数为整数和小数部分 (函数) |
(C++11)(C++11)(C++11)(C++11)(C++11)(C++11) |
将数乘以 FLT_RADIX 的幂次 (函数) |
(C++11)(C++11)(C++11) |
提取数的指数 (函数) |
(C++11)(C++11)(C++11) |
提取数的指数 (函数) |
(C++11)(C++11) (C++11)(C++11)(C++11)(C++11) |
趋向给定值的下个可表示浮点数 (函数) |
(C++11)(C++11)(C++11) |
复制浮点数的符号 (函数) |
分类与比较 | |
(C++11) |
归类给定的浮点数 (函数) |
(C++11) |
检查给定数是否拥有有限值 (函数) |
(C++11) |
检查给定数是否为无限 (函数) |
(C++11) |
检查给定的数是否 NaN (函数) |
(C++11) |
检查给定数是否正规 (函数) |
(C++11) |
检查给定数是否为负 (函数) |
(C++11) |
检查第一个浮点数实参是否大于第二个 (函数) |
(C++11) |
检查第一个浮点数实参是否大于或等于第二个 (函数) |
(C++11) |
检查第一个浮点数实参是否小于第二个 (函数) |
(C++11) |
检查第一个浮点数实参是否小于或等于第二个 (函数) |
(C++11) |
检查第一个浮点数实参是否小于或大于第二个 (函数) |
(C++11) |
检查两个浮点数是否无顺序 (函数) |
数学特殊函数 | |
(C++17)(C++17)(C++17) |
连带拉盖尔多项式 (函数) |
(C++17)(C++17)(C++17) |
连带勒让德多项式 (函数) |
(C++17)(C++17)(C++17) |
beta 函数 (函数) |
(C++17)(C++17)(C++17) |
第一类(完全)椭圆积分 (函数) |
(C++17)(C++17)(C++17) |
第二类(完全)椭圆积分 (函数) |
(C++17)(C++17)(C++17) |
第三类(完全)椭圆积分 (函数) |
(C++17)(C++17)(C++17) |
规则变形圆柱贝塞尔函数 (函数) |
(C++17)(C++17)(C++17) |
(第一类)圆柱贝塞尔函数 (函数) |
(C++17)(C++17)(C++17) |
不规则变形圆柱贝塞尔函数 (函数) |
(C++17)(C++17)(C++17) |
圆柱诺依曼函数 (函数) |
(C++17)(C++17)(C++17) |
第一类(不完全)椭圆积分 (函数) |
(C++17)(C++17)(C++17) |
第二类(不完全)椭圆积分 (函数) |
(C++17)(C++17)(C++17) |
第三类(不完全)椭圆积分 (函数) |
(C++17)(C++17)(C++17) |
指数积分 (函数) |
(C++17)(C++17)(C++17) |
埃尔米特多项式 (函数) |
(C++17)(C++17)(C++17) |
勒让德多项式 (函数) |
(C++17)(C++17)(C++17) |
拉盖尔多项式 (函数) |
(C++17)(C++17)(C++17) |
黎曼 zeta 函数 (函数) |
(C++17)(C++17)(C++17) |
(第一类)球面贝塞尔函数 (函数) |
(C++17)(C++17)(C++17) |
球面连带勒让德函数 (函数) |
(C++17)(C++17)(C++17) |
球面诺依曼函数 (函数) |
概要
对于每个至少有一个形参类型是 /* 浮点数类型 */ 的函数,实现都会为每个无 cv 限定的浮点数类型提供一个重载,该重载的函数签名中所有 /* 浮点数类型 */ 都会替换成该浮点数类型。
对于 std::abs 以外每个至少有一个形参类型是 /* 浮点数类型 */ 的函数,实现都会提供额外重载以确保在每个类型是 /* 浮点数类型 */ 的形参对应的实参都具有整数类型时,所有这些实参都会等效地转型到它们的类型中具有最高浮点数转换等级和最高浮点数转换子等级的类型,其中具有整数类型的实参被视为具有和 double 相同的浮点数转换等级。如果不存在浮点数转换等级和浮点数转换子等级最高的类型,那么重载决议不会从提供的重载中得到可用候选。
namespace std {
using float_t = /* 见描述 */;
using double_t = /* 见描述 */;
}
#define HUGE_VAL /* 见描述 */
#define HUGE_VALF /* 见描述 */
#define HUGE_VALL /* 见描述 */
#define INFINITY /* 见描述 */
#define NAN /* 见描述 */
#define FP_INFINITE /* 见描述 */
#define FP_NAN /* 见描述 */
#define FP_NORMAL /* 见描述 */
#define FP_SUBNORMAL /* 见描述 */
#define FP_ZERO /* 见描述 */
#define FP_FAST_FMA /* 见描述 */
#define FP_FAST_FMAF /* 见描述 */
#define FP_FAST_FMAL /* 见描述 */
#define FP_ILOGB0 /* 见描述 */
#define FP_ILOGBNAN /* 见描述 */
#define MATH_ERRNO /* 见描述 */
#define MATH_ERREXCEPT /* 见描述 */
#define math_errhandling /* 见描述 */
namespace std {
/* 浮点数类型 */ acos(/* 浮点数类型 */ x);
float acosf(float x);
long double acosl(long double x);
/* 浮点数类型 */ asin(/* 浮点数类型 */ x);
float asinf(float x);
long double asinl(long double x);
/* 浮点数类型 */ atan(/* 浮点数类型 */ x);
float atanf(float x);
long double atanl(long double x);
/* 浮点数类型 */ atan2(/* 浮点数类型 */ y, /* 浮点数类型 */ x);
float atan2f(float y, float x);
long double atan2l(long double y, long double x);
/* 浮点数类型 */ cos(/* 浮点数类型 */e x);
float cosf(float x);
long double cosl(long double x);
/* 浮点数类型 */ sin(/* 浮点数类型 */ x);
float sinf(float x);
long double sinl(long double x);
/* 浮点数类型 */ tan(/* 浮点数类型 */ x);
float tanf(float x);
long double tanl(long double x);
/* 浮点数类型 */ acosh(/* 浮点数类型 */ x);
float acoshf(float x);
long double acoshl(long double x);
/* 浮点数类型 */ asinh(/* 浮点数类型 */ x);
float asinhf(float x);
long double asinhl(long double x);
/* 浮点数类型 */ atanh(/* 浮点数类型 */ x);
float atanhf(float x);
long double atanhl(long double x);
/* 浮点数类型 */ cosh(/* 浮点数类型 */ x);
float coshf(float x);
long double coshl(long double x);
/* 浮点数类型 */ sinh(/* 浮点数类型 */ x);
float sinhf(float x);
long double sinhl(long double x);
/* 浮点数类型 */ tanh(/* 浮点数类型 */ x);
float tanhf(float x);
long double tanhl(long double x);
/* 浮点数类型 */ exp(/* 浮点数类型 */ x);
float expf(float x);
long double expl(long double x);
/* 浮点数类型 */ exp2(/* 浮点数类型 */ x);
float exp2f(float x);
long double exp2l(long double x);
/* 浮点数类型 */ expm1(/* 浮点数类型 */ x);
float expm1f(float x);
long double expm1l(long double x);
constexpr /* 浮点数类型 */ frexp(/* 浮点数类型 */ value, int* exp);
constexpr float frexpf(float value, int* exp);
constexpr long double frexpl(long double value, int* exp);
constexpr int ilogb(/* 浮点数类型 */ x);
constexpr int ilogbf(float x);
constexpr int ilogbl(long double x);
constexpr /* 浮点数类型 */ ldexp(/* 浮点数类型 */ x, int exp);
constexpr float ldexpf(float x, int exp);
constexpr long double ldexpl(long double x, int exp);
/* 浮点数类型 */ log(/* 浮点数类型 */ x);
float logf(float x);
long double logl(long double x);
/* 浮点数类型 */ log10(/* 浮点数类型 */ x);
float log10f(float x);
long double log10l(long double x);
/* 浮点数类型 */ log1p(/* 浮点数类型 */ x);
float log1pf(float x);
long double log1pl(long double x);
/* 浮点数类型 */ log2(/* 浮点数类型 */ x);
float log2f(float x);
long double log2l(long double x);
constexpr /* 浮点数类型 */ logb(/* 浮点数类型 */ x);
constexpr float logbf(float x);
constexpr long double logbl(long double x);
constexpr /* 浮点数类型 */ modf(/* 浮点数类型 */ value, /* 浮点数类型 */* iptr);
constexpr float modff(float value, float* iptr);
constexpr long double modfl(long double value, long double* iptr);
constexpr /* 浮点数类型 */ scalbn(/* 浮点数类型 */ x, int n);
constexpr float scalbnf(float x, int n);
constexpr long double scalbnl(long double x, int n);
constexpr /* 浮点数类型 */ scalbln(/* 浮点数类型 */ x, long int n);
constexpr float scalblnf(float x, long int n);
constexpr long double scalblnl(long double x, long int n);
/* 浮点数类型 */ cbrt(/* 浮点数类型 */ x);
float cbrtf(float x);
long double cbrtl(long double x);
// 绝对值
constexpr int abs(int j); // 独立
constexpr long int abs(long int j); // 独立
constexpr long long int abs(long long int j); // 独立
constexpr /* 浮点数类型 */ abs(/* 浮点数类型 */ j); // 独立或被删除
constexpr /* 浮点数类型 */ fabs(/* 浮点数类型 */ x);
constexpr float fabsf(float x);
constexpr long double fabsl(long double x);
/* 浮点数类型 */ hypot(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
float hypotf(float x, float y);
long double hypotl(long double x, long double y);
// 三维斜边
float hypot(/* 浮点数类型 */ x, /* 浮点数类型 */ y, /* 浮点数类型 */ z);
/* 浮点数类型 */ pow(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
float powf(float x, float y);
long double powl(long double x, long double y);
/* 浮点数类型 */ sqrt(/* 浮点数类型 */ x);
float sqrtf(float x);
long double sqrtl(long double x);
/* 浮点数类型 */ erf(/* 浮点数类型 */ x);
float erff(float x);
long double erfl(long double x);
/* 浮点数类型 */ erfc(/* 浮点数类型 */ x);
float erfcf(float x);
long double erfcl(long double x);
/* 浮点数类型 */ lgamma(/* 浮点数类型 */ x);
float lgammaf(float x);
long double lgammal(long double x);
/* 浮点数类型 */ tgamma(/* 浮点数类型 */ x);
float tgammaf(float x);
long double tgammal(long double x);
constexpr /* 浮点数类型 */ ceil(/* 浮点数类型 */ x);
constexpr float ceilf(float x);
constexpr long double ceill(long double x);
constexpr /* 浮点数类型 */ floor(/* 浮点数类型 */ x);
constexpr float floorf(float x);
constexpr long double floorl(long double x);
/* 浮点数类型 */ nearbyint(/* 浮点数类型 */ x);
float nearbyintf(float x);
long double nearbyintl(long double x);
/* 浮点数类型 */ rint(/* 浮点数类型 */ x);
float rintf(float x);
long double rintl(long double x);
long int lrint(/* 浮点数类型 */ x);
long int lrintf(float x);
long int lrintl(long double x);
long long int llrint(/* 浮点数类型 */ x);
long long int llrintf(float x);
long long int llrintl(long double x);
constexpr /* 浮点数类型 */ round(/* 浮点数类型 */ x);
constexpr float roundf(float x);
constexpr long double roundl(long double x);
constexpr long int lround(/* 浮点数类型 */ x);
constexpr long int lroundf(float x);
constexpr long int lroundl(long double x);
constexpr long long int llround(/* 浮点数类型 */ x);
constexpr long long int llroundf(float x);
constexpr long long int llroundl(long double x);
constexpr /* 浮点数类型 */ trunc(/* 浮点数类型 */ x);
constexpr float truncf(float x);
constexpr long double truncl(long double x);
constexpr /* 浮点数类型 */ fmod(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr float fmodf(float x, float y);
constexpr long double fmodl(long double x, long double y);
constexpr /* 浮点数类型 */ remainder(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr float remainderf(float x, float y);
constexpr long double remainderl(long double x, long double y);
constexpr /* 浮点数类型 */ remquo(/* 浮点数类型 */ x, /* 浮点数类型 */ y, int* quo);
constexpr float remquof(float x, float y, int* quo);
constexpr long double remquol(long double x, long double y, int* quo);
constexpr /* 浮点数类型 */ copysign(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr float copysignf(float x, float y);
constexpr long double copysignl(long double x, long double y);
double nan(const char* tagp);
float nanf(const char* tagp);
long double nanl(const char* tagp);
constexpr /* 浮点数类型 */ nextafter(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr float nextafterf(float x, float y);
constexpr long double nextafterl(long double x, long double y);
constexpr /* 浮点数类型 */ nexttoward(/* 浮点数类型 */ x, long double y);
constexpr float nexttowardf(float x, long double y);
constexpr long double nexttowardl(long double x, long double y);
constexpr /* 浮点数类型 */ fdim(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr float fdimf(float x, float y);
constexpr long double fdiml(long double x, long double y);
constexpr /* 浮点数类型 */ fmax(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr float fmaxf(float x, float y);
constexpr long double fmaxl(long double x, long double y);
constexpr /* 浮点数类型 */ fmin(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr float fminf(float x, float y);
constexpr long double fminl(long double x, long double y);
constexpr /* 浮点数类型 */ fma(/* 浮点数类型 */ x, /* 浮点数类型 */ y, /* 浮点数类型 */ z);
constexpr float fmaf(float x, float y, float z);
constexpr long double fmal(long double x, long double y, long double z);
// 线性插值
constexpr /* 浮点数类型 */ lerp(/* 浮点数类型 */ a, /* 浮点数类型 */ b, /* 浮点数类型 */ t) noexcept;
// 分类/比较函数
constexpr int fpclassify(/* 浮点数类型 */ x);
constexpr bool isfinite(/* 浮点数类型 */ x);
constexpr bool isinf(/* 浮点数类型 */ x);
constexpr bool isnan(/* 浮点数类型 */ x);
constexpr bool isnormal(/* 浮点数类型 */ x);
constexpr bool signbit(/* 浮点数类型 */ x);
constexpr bool isgreater(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr bool isgreaterequal(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr bool isless(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr bool islessequal(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr bool islessgreater(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
constexpr bool isunordered(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
// 数学特殊函数
// 连带拉盖尔多项式
/* 浮点数类型 */ assoc_laguerre(unsigned n, unsigned m, /* 浮点数类型 */ x);
float assoc_laguerref(unsigned n, unsigned m, float x);
long double assoc_laguerrel(unsigned n, unsigned m, long double x);
// 连带勒让德多项式
/* 浮点数类型 */ assoc_legendre(unsigned l, unsigned m, /* 浮点数类型 */ x);
float assoc_legendref(unsigned l, unsigned m, float x);
long double assoc_legendrel(unsigned l, unsigned m, long double x);
// beta 函数
/* 浮点数类型 */ beta(/* 浮点数类型 */ x, /* 浮点数类型 */ y);
float betaf(float x, float y);
long double betal(long double x, long double y);
// 第一类完全椭圆积分
/* 浮点数类型 */ comp_ellint_1(/* 浮点数类型 */ k);
float comp_ellint_1f(float k);
long double comp_ellint_1l(long double k);
// 第二类完全椭圆积分
/* 浮点数类型 */ comp_ellint_2(/* 浮点数类型 */ k);
float comp_ellint_2f(float k);
long double comp_ellint_2l(long double k);
// 第三类完全椭圆积分
/* 浮点数类型 */ comp_ellint_3(/* 浮点数类型 */ k, /* 浮点数类型 */ nu);
float comp_ellint_3f(float k, float nu);
long double comp_ellint_3l(long double k, long double nu);
// 规则变形圆柱贝塞尔函数
/* 浮点数类型 */ cyl_bessel_i(/* 浮点数类型 */ nu, /* 浮点数类型 */ x);
float cyl_bessel_if(float nu, float x);
long double cyl_bessel_il(long double nu, long double x);
// 第一类圆柱贝塞尔函数
/* 浮点数类型 */ cyl_bessel_j(/* 浮点数类型 */ nu, /* 浮点数类型 */ x);
float cyl_bessel_jf(float nu, float x);
long double cyl_bessel_jl(long double nu, long double x);
// 不规则变形圆柱贝塞尔函数
/* 浮点数类型 */ cyl_bessel_k(/* 浮点数类型 */ nu, /* 浮点数类型 */ x);
float cyl_bessel_kf(float nu, float x);
long double cyl_bessel_kl(long double nu, long double x);
// 圆柱诺伊曼函数;
// 第二类圆柱贝塞尔函数
/* 浮点数类型 */ cyl_neumann(/* 浮点数类型 */ nu, /* 浮点数类型 */ x);
float cyl_neumannf(float nu, float x);
long double cyl_neumannl(long double nu, long double x);
// 第一类不完全椭圆积分
/* 浮点数类型 */ ellint_1(/* 浮点数类型 */ k, /* 浮点数类型 */ phi);
float ellint_1f(float k, float phi);
long double ellint_1l(long double k, long double phi);
// 第二类不完全椭圆积分
/* 浮点数类型 */ ellint_2(/* 浮点数类型 */ k, /* 浮点数类型 */ phi);
float ellint_2f(float k, float phi);
long double ellint_2l(long double k, long double phi);
// 第三类不完全椭圆积分
/* 浮点数类型 */ ellint_3(/* 浮点数类型 */ k, /* 浮点数类型 */ nu, /* 浮点数类型 */ phi);
float ellint_3f(float k, float nu, float phi);
long double ellint_3l(long double k, long double nu, long double phi);
// 指数积分
/* 浮点数类型 */ expint(/* 浮点数类型 */ x);
float expintf(float x);
long double expintl(long double x);
// 埃尔米特多项式
/* 浮点数类型 */ hermite(unsigned n, /* 浮点数类型 */ x);
float hermitef(unsigned n, float x);
long double hermitel(unsigned n, long double x);
// 拉盖尔多项式
/* 浮点数类型 */ laguerre(unsigned n, /* 浮点数类型 */ x);
float laguerref(unsigned n, float x);
long double laguerrel(unsigned n, long double x);
// 勒让德多项式
/* 浮点数类型 */ legendre(unsigned l, /* 浮点数类型 */ x);
float legendref(unsigned l, float x);
long double legendrel(unsigned l, long double x);
// 黎曼 zeta 函数
/* 浮点数类型 */ riemann_zeta(/* 浮点数类型 */ x);
float riemann_zetaf(float x);
long double riemann_zetal(long double x);
// 第一类球面贝塞尔函数
/* 浮点数类型 */ sph_bessel(unsigned n, /* 浮点数类型 */ x);
float sph_besself(unsigned n, float x);
long double sph_bessell(unsigned n, long double x);
// 球面连带勒让德函数
/* 浮点数类型 */ sph_legendre(unsigned l, unsigned m, /* 浮点数类型 */ theta);
float sph_legendref(unsigned l, unsigned m, float theta);
long double sph_legendrel(unsigned l, unsigned m, long double theta);
// 球面诺依曼函数;
// 第二类球面贝塞尔函数
/* 浮点数类型 */ sph_neumann(unsigned n, /* 浮点数类型 */ x);
float sph_neumannf(unsigned n, float x);
long double sph_neumannl(unsigned n, long double x);
}