标准库标头 <cmath>
来自cppreference.com
此标头原作为 <math.h> 存在于 C 标准库。
此头文件是数值库的一部分。
类型 | ||
float_t (C++11) | 至少和 float 一样宽的最高效浮点数类型 (typedef) | |
double_t (C++11) | 至少和 double 一样宽的最高效浮点数类型 (typedef) | |
宏 | ||
(C++11)(C++11) | 分别指示 float、double 和 longdouble 的上溢值 (宏常量) | |
(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);longdouble acosl(longdouble x); /* 浮点数类型 */ asin(/* 浮点数类型 */ x);float asinf(float x);longdouble asinl(longdouble x); /* 浮点数类型 */ atan(/* 浮点数类型 */ x);float atanf(float x);longdouble atanl(longdouble x); /* 浮点数类型 */ atan2(/* 浮点数类型 */ y, /* 浮点数类型 */ x);float atan2f(float y, float x);longdouble atan2l(longdouble y, longdouble x); /* 浮点数类型 */ cos(/* 浮点数类型 */e x);float cosf(float x);longdouble cosl(longdouble x); /* 浮点数类型 */ sin(/* 浮点数类型 */ x);float sinf(float x);longdouble sinl(longdouble x); /* 浮点数类型 */ tan(/* 浮点数类型 */ x);float tanf(float x);longdouble tanl(longdouble x); /* 浮点数类型 */ acosh(/* 浮点数类型 */ x);float acoshf(float x);longdouble acoshl(longdouble x); /* 浮点数类型 */ asinh(/* 浮点数类型 */ x);float asinhf(float x);longdouble asinhl(longdouble x); /* 浮点数类型 */ atanh(/* 浮点数类型 */ x);float atanhf(float x);longdouble atanhl(longdouble x); /* 浮点数类型 */ cosh(/* 浮点数类型 */ x);float coshf(float x);longdouble coshl(longdouble x); /* 浮点数类型 */ sinh(/* 浮点数类型 */ x);float sinhf(float x);longdouble sinhl(longdouble x); /* 浮点数类型 */ tanh(/* 浮点数类型 */ x);float tanhf(float x);longdouble tanhl(longdouble x); /* 浮点数类型 */ exp(/* 浮点数类型 */ x);float expf(float x);longdouble expl(longdouble x); /* 浮点数类型 */ exp2(/* 浮点数类型 */ x);float exp2f(float x);longdouble exp2l(longdouble x); /* 浮点数类型 */ expm1(/* 浮点数类型 */ x);float expm1f(float x);longdouble expm1l(longdouble x); constexpr/* 浮点数类型 */ frexp(/* 浮点数类型 */ value, int* exp);constexprfloat frexpf(float value, int* exp);constexprlongdouble frexpl(longdouble value, int* exp); constexprint ilogb(/* 浮点数类型 */ x);constexprint ilogbf(float x);constexprint ilogbl(longdouble x); constexpr/* 浮点数类型 */ ldexp(/* 浮点数类型 */ x, int exp);constexprfloat ldexpf(float x, int exp);constexprlongdouble ldexpl(longdouble x, int exp); /* 浮点数类型 */ log(/* 浮点数类型 */ x);float logf(float x);longdouble logl(longdouble x); /* 浮点数类型 */ log10(/* 浮点数类型 */ x);float log10f(float x);longdouble log10l(longdouble x); /* 浮点数类型 */ log1p(/* 浮点数类型 */ x);float log1pf(float x);longdouble log1pl(longdouble x); /* 浮点数类型 */ log2(/* 浮点数类型 */ x);float log2f(float x);longdouble log2l(longdouble x); constexpr/* 浮点数类型 */ logb(/* 浮点数类型 */ x);constexprfloat logbf(float x);constexprlongdouble logbl(longdouble x); constexpr/* 浮点数类型 */ modf(/* 浮点数类型 */ value, /* 浮点数类型 */* iptr);constexprfloat modff(float value, float* iptr);constexprlongdouble modfl(longdouble value, longdouble* iptr); constexpr/* 浮点数类型 */ scalbn(/* 浮点数类型 */ x, int n);constexprfloat scalbnf(float x, int n);constexprlongdouble scalbnl(longdouble x, int n); constexpr/* 浮点数类型 */ scalbln(/* 浮点数类型 */ x, longint n);constexprfloat scalblnf(float x, longint n);constexprlongdouble scalblnl(longdouble x, longint n); /* 浮点数类型 */ cbrt(/* 浮点数类型 */ x);float cbrtf(float x);longdouble cbrtl(longdouble x); // 绝对值constexprint abs(int j);// 独立constexprlongint abs(longint j);// 独立constexprlonglongint abs(longlongint j);// 独立constexpr/* 浮点数类型 */ abs(/* 浮点数类型 */ j);// 独立或被删除 constexpr/* 浮点数类型 */ fabs(/* 浮点数类型 */ x);constexprfloat fabsf(float x);constexprlongdouble fabsl(longdouble x); /* 浮点数类型 */ hypot(/* 浮点数类型 */ x, /* 浮点数类型 */ y);float hypotf(float x, float y);longdouble hypotl(longdouble x, longdouble y); // 三维斜边float hypot(/* 浮点数类型 */ x, /* 浮点数类型 */ y, /* 浮点数类型 */ z); /* 浮点数类型 */ pow(/* 浮点数类型 */ x, /* 浮点数类型 */ y);float powf(float x, float y);longdouble powl(longdouble x, longdouble y); /* 浮点数类型 */ sqrt(/* 浮点数类型 */ x);float sqrtf(float x);longdouble sqrtl(longdouble x); /* 浮点数类型 */ erf(/* 浮点数类型 */ x);float erff(float x);longdouble erfl(longdouble x); /* 浮点数类型 */ erfc(/* 浮点数类型 */ x);float erfcf(float x);longdouble erfcl(longdouble x); /* 浮点数类型 */ lgamma(/* 浮点数类型 */ x);float lgammaf(float x);longdouble lgammal(longdouble x); /* 浮点数类型 */ tgamma(/* 浮点数类型 */ x);float tgammaf(float x);longdouble tgammal(longdouble x); constexpr/* 浮点数类型 */ ceil(/* 浮点数类型 */ x);constexprfloat ceilf(float x);constexprlongdouble ceill(longdouble x); constexpr/* 浮点数类型 */ floor(/* 浮点数类型 */ x);constexprfloat floorf(float x);constexprlongdouble floorl(longdouble x); /* 浮点数类型 */ nearbyint(/* 浮点数类型 */ x);float nearbyintf(float x);longdouble nearbyintl(longdouble x); /* 浮点数类型 */ rint(/* 浮点数类型 */ x);float rintf(float x);longdouble rintl(longdouble x); longint lrint(/* 浮点数类型 */ x);longint lrintf(float x);longint lrintl(longdouble x); longlongint llrint(/* 浮点数类型 */ x);longlongint llrintf(float x);longlongint llrintl(longdouble x); constexpr/* 浮点数类型 */ round(/* 浮点数类型 */ x);constexprfloat roundf(float x);constexprlongdouble roundl(longdouble x); constexprlongint lround(/* 浮点数类型 */ x);constexprlongint lroundf(float x);constexprlongint lroundl(longdouble x); constexprlonglongint llround(/* 浮点数类型 */ x);constexprlonglongint llroundf(float x);constexprlonglongint llroundl(longdouble x); constexpr/* 浮点数类型 */ trunc(/* 浮点数类型 */ x);constexprfloat truncf(float x);constexprlongdouble truncl(longdouble x); constexpr/* 浮点数类型 */ fmod(/* 浮点数类型 */ x, /* 浮点数类型 */ y);constexprfloat fmodf(float x, float y);constexprlongdouble fmodl(longdouble x, longdouble y); constexpr/* 浮点数类型 */ remainder(/* 浮点数类型 */ x, /* 浮点数类型 */ y);constexprfloat remainderf(float x, float y);constexprlongdouble remainderl(longdouble x, longdouble y); constexpr/* 浮点数类型 */ remquo(/* 浮点数类型 */ x, /* 浮点数类型 */ y, int* quo);constexprfloat remquof(float x, float y, int* quo);constexprlongdouble remquol(longdouble x, longdouble y, int* quo); constexpr/* 浮点数类型 */ copysign(/* 浮点数类型 */ x, /* 浮点数类型 */ y);constexprfloat copysignf(float x, float y);constexprlongdouble copysignl(longdouble x, longdouble y); double nan(constchar* tagp);float nanf(constchar* tagp);longdouble nanl(constchar* tagp); constexpr/* 浮点数类型 */ nextafter(/* 浮点数类型 */ x, /* 浮点数类型 */ y);constexprfloat nextafterf(float x, float y);constexprlongdouble nextafterl(longdouble x, longdouble y); constexpr/* 浮点数类型 */ nexttoward(/* 浮点数类型 */ x, longdouble y);constexprfloat nexttowardf(float x, longdouble y);constexprlongdouble nexttowardl(longdouble x, longdouble y); constexpr/* 浮点数类型 */ fdim(/* 浮点数类型 */ x, /* 浮点数类型 */ y);constexprfloat fdimf(float x, float y);constexprlongdouble fdiml(longdouble x, longdouble y); constexpr/* 浮点数类型 */ fmax(/* 浮点数类型 */ x, /* 浮点数类型 */ y);constexprfloat fmaxf(float x, float y);constexprlongdouble fmaxl(longdouble x, longdouble y); constexpr/* 浮点数类型 */ fmin(/* 浮点数类型 */ x, /* 浮点数类型 */ y);constexprfloat fminf(float x, float y);constexprlongdouble fminl(longdouble x, longdouble y); constexpr/* 浮点数类型 */ fma(/* 浮点数类型 */ x, /* 浮点数类型 */ y, /* 浮点数类型 */ z);constexprfloat fmaf(float x, float y, float z);constexprlongdouble fmal(longdouble x, longdouble y, longdouble z); // 线性插值constexpr/* 浮点数类型 */ lerp(/* 浮点数类型 */ a, /* 浮点数类型 */ b, /* 浮点数类型 */ t)noexcept; // 分类/比较函数constexprint fpclassify(/* 浮点数类型 */ x); constexprbool isfinite(/* 浮点数类型 */ x); constexprbool isinf(/* 浮点数类型 */ x); constexprbool isnan(/* 浮点数类型 */ x); constexprbool isnormal(/* 浮点数类型 */ x); constexprbool signbit(/* 浮点数类型 */ x); constexprbool isgreater(/* 浮点数类型 */ x, /* 浮点数类型 */ y); constexprbool isgreaterequal(/* 浮点数类型 */ x, /* 浮点数类型 */ y); constexprbool isless(/* 浮点数类型 */ x, /* 浮点数类型 */ y); constexprbool islessequal(/* 浮点数类型 */ x, /* 浮点数类型 */ y); constexprbool islessgreater(/* 浮点数类型 */ x, /* 浮点数类型 */ y); constexprbool isunordered(/* 浮点数类型 */ x, /* 浮点数类型 */ y); // 数学特殊函数 // 连带拉盖尔多项式/* 浮点数类型 */ assoc_laguerre(unsigned n, unsigned m, /* 浮点数类型 */ x);float assoc_laguerref(unsigned n, unsigned m, float x);longdouble assoc_laguerrel(unsigned n, unsigned m, longdouble x); // 连带勒让德多项式/* 浮点数类型 */ assoc_legendre(unsigned l, unsigned m, /* 浮点数类型 */ x);float assoc_legendref(unsigned l, unsigned m, float x);longdouble assoc_legendrel(unsigned l, unsigned m, longdouble x); // beta 函数/* 浮点数类型 */ beta(/* 浮点数类型 */ x, /* 浮点数类型 */ y);float betaf(float x, float y);longdouble betal(longdouble x, longdouble y); // 第一类完全椭圆积分/* 浮点数类型 */ comp_ellint_1(/* 浮点数类型 */ k);float comp_ellint_1f(float k);longdouble comp_ellint_1l(longdouble k); // 第二类完全椭圆积分/* 浮点数类型 */ comp_ellint_2(/* 浮点数类型 */ k);float comp_ellint_2f(float k);longdouble comp_ellint_2l(longdouble k); // 第三类完全椭圆积分/* 浮点数类型 */ comp_ellint_3(/* 浮点数类型 */ k, /* 浮点数类型 */ nu);float comp_ellint_3f(float k, float nu);longdouble comp_ellint_3l(longdouble k, longdouble nu); // 规则变形圆柱贝塞尔函数/* 浮点数类型 */ cyl_bessel_i(/* 浮点数类型 */ nu, /* 浮点数类型 */ x);float cyl_bessel_if(float nu, float x);longdouble cyl_bessel_il(longdouble nu, longdouble x); // 第一类圆柱贝塞尔函数/* 浮点数类型 */ cyl_bessel_j(/* 浮点数类型 */ nu, /* 浮点数类型 */ x);float cyl_bessel_jf(float nu, float x);longdouble cyl_bessel_jl(longdouble nu, longdouble x); // 不规则变形圆柱贝塞尔函数/* 浮点数类型 */ cyl_bessel_k(/* 浮点数类型 */ nu, /* 浮点数类型 */ x);float cyl_bessel_kf(float nu, float x);longdouble cyl_bessel_kl(longdouble nu, longdouble x); // 圆柱诺伊曼函数;// 第二类圆柱贝塞尔函数/* 浮点数类型 */ cyl_neumann(/* 浮点数类型 */ nu, /* 浮点数类型 */ x);float cyl_neumannf(float nu, float x);longdouble cyl_neumannl(longdouble nu, longdouble x); // 第一类不完全椭圆积分/* 浮点数类型 */ ellint_1(/* 浮点数类型 */ k, /* 浮点数类型 */ phi);float ellint_1f(float k, float phi);longdouble ellint_1l(longdouble k, longdouble phi); // 第二类不完全椭圆积分/* 浮点数类型 */ ellint_2(/* 浮点数类型 */ k, /* 浮点数类型 */ phi);float ellint_2f(float k, float phi);longdouble ellint_2l(longdouble k, longdouble phi); // 第三类不完全椭圆积分/* 浮点数类型 */ ellint_3(/* 浮点数类型 */ k, /* 浮点数类型 */ nu, /* 浮点数类型 */ phi);float ellint_3f(float k, float nu, float phi);longdouble ellint_3l(longdouble k, longdouble nu, longdouble phi); // 指数积分/* 浮点数类型 */ expint(/* 浮点数类型 */ x);float expintf(float x);longdouble expintl(longdouble x); // 埃尔米特多项式/* 浮点数类型 */ hermite(unsigned n, /* 浮点数类型 */ x);float hermitef(unsigned n, float x);longdouble hermitel(unsigned n, longdouble x); // 拉盖尔多项式/* 浮点数类型 */ laguerre(unsigned n, /* 浮点数类型 */ x);float laguerref(unsigned n, float x);longdouble laguerrel(unsigned n, longdouble x); // 勒让德多项式/* 浮点数类型 */ legendre(unsigned l, /* 浮点数类型 */ x);float legendref(unsigned l, float x);longdouble legendrel(unsigned l, longdouble x); // 黎曼 zeta 函数/* 浮点数类型 */ riemann_zeta(/* 浮点数类型 */ x);float riemann_zetaf(float x);longdouble riemann_zetal(longdouble x); // 第一类球面贝塞尔函数/* 浮点数类型 */ sph_bessel(unsigned n, /* 浮点数类型 */ x);float sph_besself(unsigned n, float x);longdouble sph_bessell(unsigned n, longdouble x); // 球面连带勒让德函数/* 浮点数类型 */ sph_legendre(unsigned l, unsigned m, /* 浮点数类型 */ theta);float sph_legendref(unsigned l, unsigned m, float theta);longdouble sph_legendrel(unsigned l, unsigned m, longdouble theta); // 球面诺依曼函数;// 第二类球面贝塞尔函数/* 浮点数类型 */ sph_neumann(unsigned n, /* 浮点数类型 */ x);float sph_neumannf(unsigned n, float x);longdouble sph_neumannl(unsigned n, longdouble x);}