# 数学和浮点支持Math and floating-point support

## 受支持的数学和浮点例程Supported math and floating-point routines

abs、labs、llabs、_abs64abs, labs, llabs, _abs64 计算整数类型的绝对值Computes the absolute value of an integer type
acos、acosf、acoslacos, acosf, acosl 计算反余弦值Computes the arc cosine
acosh、acoshf、acoshlacosh, acoshf, acoshl 计算双曲反余弦值Computes the hyperbolic arc cosine
asin、asinf、asinlasin, asinf, asinl 计算反正弦值Computes the arc sine
asinh、asinhf、asinhlasinh, asinhf, asinhl 计算双曲反正弦值Computes the hyperbolic arc sine
atan、atanf、atanl、atan2、atan2f、atan2latan, atanf, atanl, atan2, atan2f, atan2l 计算反正切值Computes the arc tangent
atanh、atanhf、atanhlatanh, atanhf, atanhl 计算双曲反正切值Computes the hyperbolic arc tangent
_atodbl、_atodbl_l_atodbl, _atodbl_l 将特定于区域设置的字符串转换为双精度型Converts a locale-specific string to a double
atof、_atof_latof, _atof_l 将字符串转换为双精度型Converts a string to a double
_atoflt、_atoflt_l、_atoldbl、_atoldbl_l_atoflt, _atoflt_l, _atoldbl, _atoldbl_l 将特定于区域设置的字符串转换为浮点型或长双精度型Converts a locale-specific string to a float or long double
cbrt、cbrtf、cbrtlcbrt, cbrtf, cbrtl 计算立方根Computes the cube root
ceil、ceilf、ceillceil, ceilf, ceill 计算上限Computes the ceiling
_chgsign、_chgsignf、_chgsignl_chgsign, _chgsignf, _chgsignl 计算相反数Computes the additive inverse
_clear87、_clearfp_clear87, _clearfp 获取并清除浮点状态注册Gets and clears the floating-point status register
_control87、__control87_2、_controlfp_control87, __control87_2, _controlfp 获取并设置浮点控制字Gets and sets the floating-point control word
_controlfp_s_controlfp_s _controlfp 的安全版本Secure version of _controlfp
copysign、copysignf、copysignl、_copysign、_copysignf、_copysignlcopysign, copysignf, copysignl, _copysign, _copysignf, _copysignl 返回一个值，该值具有一个自变量的数值和另一个自变量的符号Returns a value that has the magnitude of one argument and the sign of another
cos、cosf、coslcos, cosf, cosl 计算正弦值Computes the sine
cosh、coshf、coshlcosh, coshf, coshl 计算双曲正弦值Computes the hyperbolic sine
div、ldiv、lldivdiv, ldiv, lldiv 计算两个整数值的商和余数Computes the quotient and the remainder of two integer values

_ecvt_s_ecvt_s _ecvt 的安全版本Secure version of _ecvt
erf、erff、erflerf, erff, erfl 计算错误函数Computes the error function
erfc、erfcf、erfclerfc, erfcf, erfcl 计算互补错误函数Computes the complementary error function
exp、expf、explexp, expf, expl 计算指数 exComputes the exponential ex
exp2、exp2f、exp2lexp2, exp2f, exp2l 计算指数 2xComputes the exponential 2x
expm1、expm1f、expm1lexpm1, expm1f, expm1l 计算 ex-1Computes ex-1
fabs、fabsf、fabslfabs, fabsf, fabsl 计算浮点类型的绝对值Computes the absolute value of a floating-point type

_fcvt_s_fcvt_s _fcvt 的安全版本Secure version of _fcvt
fdim、fdimf、fdimlfdim, fdimf, fdiml 确定两个值之间的正数差Determines the positive difference between two values
feclearexceptfeclearexcept 清除指定的浮点异常Clears specified floating-point exceptions
fegetenvfegetenv 存储当前的浮点环境Stores the current floating-point environment
fegetexceptflagfegetexceptflag 获取指定的浮点异常状态Gets the specified floating-point exception status
fegetroundfegetround 获取浮点舍入模式Gets the floating-point rounding mode
feholdexceptfeholdexcept 设置不间断的浮点异常模式Sets non-stop floating-point exception mode
feraiseexceptferaiseexcept 引发指定的浮点异常Raises the specified floating-point exceptions
fesetenvfesetenv 设置当前的浮点环境Sets the current floating-point environment
fesetexceptflagfesetexceptflag 获取指定的浮点异常状态标志Sets the specified floating-point status flags
fesetroundfesetround 设置指定的浮点舍入标志Sets the specified floating-point rounding mode
fetestexceptfetestexcept 确定要设置的浮点异常状态标志Determines which floating-point exception status flags are set
feupdateenvfeupdateenv 还原浮点环境，然后引发以前的异常Restores a floating-point environment then raises previous exceptions
_finite、_finitef_finite, _finitef 确定某值是否有限Determines whether a value is finite
floor、floorf、floorlfloor, floorf, floorl 计算下限Computes the floor
fma、fmaf、fmalfma, fmaf, fmal 计算浮点混合乘加运算Computes a fused multiply-add
fmax、fmaxf、fmaxlfmax, fmaxf, fmaxl 计算参数的最大值Computes the maximum of the arguments
fmin、fminf、fminlfmin, fminf, fminl 计算参数的最小值Computes the minumum of the arguments
fmod、fmodf、fmodlfmod, fmodf, fmodl 计算浮点余数Computes the floating-point remainder
_fpclass、_fpclassf_fpclass, _fpclassf 返回浮点值的分类Returns the classification of a floating-point value
fpclassifyfpclassify 返回浮点值的分类Returns the classification of a floating-point value
_fpieee_flt_fpieee_flt 设置浮点异常的处理程序Sets a handler for floating-point exceptions
_fpreset_fpreset 重置浮点环境Resets the floating-point environment
frexp、frexpf、frexplfrexp, frexpf, frexpl 获取浮点数的尾数和指数Gets the mantissa and exponent of a floating-point number

_gcvt_s_gcvt_s _gcvt 的安全版本Secure version of _gcvt
_get_FMA3_enable、_set_FMA3_enable_get_FMA3_enable, _set_FMA3_enable 获取或设置用于 x64 上 FMA3 指令的标志Gets or sets a flag for use of FMA3 instructions on x64
hypot、hypotf、hypotl、_hypot、_hypotf、_hypotlhypot, hypotf, hypotl, _hypot, _hypotf, _hypotl 计算斜边Computes the hypotenuse
ilogb、ilogbf、ilogblilogb, ilogbf, ilogbl 计算以整数 2 为底的指数Computes the integer base-2 exponent
imaxabsimaxabs 计算整数类型的绝对值Computes the absolute value of an integer type
imaxdivimaxdiv 计算两个整数值的商和余数Computes the quotient and the remainder of two integer values
isnan、_isnan、_isnanfisnan, _isnan, _isnanf 测试 NaN 的浮点值Tests a floating-point value for NaN
_j0、_j1、_jn_j0, _j1, _jn 计算贝塞尔函数Computes the Bessel function
ldexp、ldexpf、ldexplldexp, ldexpf, ldexpl 计算 x*2nComputes x*2n
lgamma、lgammaf、lgammallgamma, lgammaf, lgammal 计算 gamma 函数的绝对值的自然对数Computes the natural logarithm of the absolute value of the gamma function
llrint、llrintf、llrintlllrint, llrintf, llrintl 将浮点值舍入为最接近的超长值Rounds a floating-point value to the nearest long long value
llround、llroundf、llroundlllround, llroundf, llroundl 将浮点值舍入为最接近的超长值Rounds a floating-point value to the nearest long long value
log、logf、logl、log10、log10f、log10llog, logf, logl, log10, log10f, log10l 计算自然对数或以 10 为底的对数Computes the natural or base-10 logarithm
log1p、log1pf、log1pllog1p, log1pf, log1pl 计算 1+x 的自然对数Computes the natural logarithm of 1+x
log2、log2f、log2llog2, log2f, log2l 计算以 2 为底的对数Computes the base-2 logarithm
logb、logbf、logbl、_logb、_logbflogb, logbf, logbl, _logb, _logbf 返回浮点值的指数Returns the exponent of a floating-point value
lrint、lrintf、lrintllrint, lrintf, lrintl 将浮点值舍入为最接近的长值Rounds a floating-point value to the nearest long value
_lrotl、_lrotr_lrotl, _lrotr 向左或向右旋转整数值Rotates an integer value left or right
lround、lroundf、lroundllround, lroundf, lroundl 将浮点值舍入为最接近的长值Rounds a floating-point value to the nearest long value
_matherr_matherr 默认数学错误处理程序The default math error handler
__max__max 返回两个值中的较大者的宏Macro that returns the larger of two values
__min__min 返回两个值中的较小者的宏Macro that returns the smaller of two values
modf、modff、modflmodf, modff, modfl 将浮点值拆分为小数部分和整数部分Splits a floating-point value into fractional and integer parts
nan、nanf、nanlnan, nanf, nanl 返回 quiet NaN 值Returns a quiet NaN value
nearbyint、nearbyintf、nearbyintlnearbyint, nearbyintf, nearbyintl 返回舍入后的值Returns the rounded value
nextafter、nextafterf、nextafterl、_nextafter、_nextafterfnextafter, nextafterf, nextafterl, _nextafter, _nextafterf 返回下一个可表示的浮点值Returns the next representable floating-point value
nexttoward、nexttowardf、nexttowardlnexttoward, nexttowardf, nexttowardl 返回下一个可表示的浮点值Returns the next representable floating-point value
pow、powf、powlpow, powf, powl 返回 xy 的值Returns the value of xy
remainder、remainderf、remainderlremainder, remainderf, remainderl 计算两个浮点值的商的余数Computes the remainder of the quotient of two floating-point values
remquo、remquof、remquolremquo, remquof, remquol 计算两个整数值的余数Computes the remainder of two integer values
rint、rintf、rintlrint, rintf, rintl 舍入浮点值Rounds a floating-point value
_rotl、_rotl64、_rotr、_rotr64_rotl, _rotl64, _rotr, _rotr64 旋转整数类型中的位Rotates bits in integer types
round、roundf、roundlround, roundf, roundl 舍入浮点值Rounds a floating-point value
_scalb、_scalbf_scalb, _scalbf 按 2 的幂缩放参数Scales argument by a power of 2
scalbn、scalbnf、scalbnl、scalbln、scalblnf、scalblnlscalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl 将浮点数乘以 FLT_RADIX 的整数幂Multiplies a floating-point number by an integral power of FLT_RADIX
_set_controlfp_set_controlfp 设置浮点控制字Sets the floating-point control word
_set_SSE2_enable_set_SSE2_enable 启用或禁用 SSE2 指令Enables or disables SSE2 instructions
sin、sinf、sinlsin, sinf, sinl 计算正弦值Computes the sine
sinh、sinhf、sinhlsinh, sinhf, sinhl 计算双曲正弦值Computes the hyperbolic sine
sqrt、sqrtf、sqrtlsqrt, sqrtf, sqrtl 计算平方根Computes the square root
_status87、_statusfp、_statusfp2_status87, _statusfp, _statusfp2 获取浮点状态字Gets the floating-point status word
strtof、_strtof_lstrtof, _strtof_l 将字符串转换为浮点型Converts a string to a float
strtold、_strtold_lstrtold, _strtold_l 将字符串转换为长双精度型Converts a string to a long double
tan、tanf、tanltan, tanf, tanl 计算正切值Computes the tangent
tanh、tanhf、tanhltanh, tanhf, tanhl 计算双曲正切值Computes the hyperbolic tangent
tgamma、tgammaf、tgammaltgamma, tgammaf, tgammal 计算 gamma 函数Computes the gamma function
trunc、truncf、truncltrunc, truncf, truncl 截断小数部分Truncates the fractional part
_wtof、_wtof_l_wtof, _wtof_l 将宽字符串转换为双精度型Converts a wide string to a double
_y0、_y1、_yn_y0, _y1, _yn 计算贝塞尔函数Computes the Bessel function