- MATH
- Overview
- Summary
- Files
- Data Structures
- Macros
- Typedefs
- Functions
- Details
- Macro Definition Documentation
- isfinite
- isgreater
- isgreaterequal
- isinf
- isless
- islessequal
- islessgreater
- isnan
- isnormal
- isunordered
- signbit
- Function Documentation
- acos()
- acosf()
- acosh()
- acoshf()
- acoshl()
- acosl()
- asin()
- asinf()
- asinh()
- asinhf()
- asinhl()
- asinl()
- atan()
- atan2()
- atan2f()
- atan2l()
- atanf()
- atanh()
- atanhf()
- atanhl()
- atanl()
- cabs()
- cabsf()
- cabsl()
- cacos()
- cacosf()
- cacosh()
- cacoshf()
- cacoshl()
- cacosl()
- carg()
- cargf()
- cargl()
- casin()
- casinf()
- casinh()
- casinhf()
- casinhl()
- casinl()
- catan()
- catanf()
- catanh()
- catanhf()
- catanhl()
- catanl()
- cbrt()
- cbrtf()
- cbrtl()
- ccos()
- ccosf()
- ccosh()
- ccoshf()
- ccoshl()
- ccosl()
- ceil()
- ceilf()
- ceill()
- cexp()
- cexpf()
- cexpl()
- cimag()
- cimagf()
- cimagl()
- clog()
- clogf()
- clogl()
- conj()
- conjf()
- conjl()
- copysign()
- copysignf()
- copysignl()
- cos()
- cosf()
- cosh()
- coshf()
- coshl()
- cosl()
- cpow()
- cpowf()
- cpowl()
- cproj()
- cprojf()
- cprojl()
- creal()
- crealf()
- creall()
- csin()
- csinf()
- csinh()
- csinhf()
- csinhl()
- csinl()
- csqrt()
- csqrtf()
- csqrtl()
- ctan()
- ctanf()
- ctanh()
- ctanhf()
- ctanhl()
- ctanl()
- erf()
- erfc()
- erfcf()
- erfcl()
- erff()
- erfl()
- exp()
- exp10()
- exp10f()
- exp10l()
- exp2()
- exp2f()
- exp2l()
- expf()
- expl()
- expm1()
- expm1f()
- expm1l()
- fabs()
- fabsf()
- fabsl()
- fdim()
- fdimf()
- fdiml()
- feclearexcept()
- fegetenv()
- fegetexceptflag()
- fegetround()
- feholdexcept()
- feraiseexcept()
- fesetenv()
- fesetexceptflag()
- fesetround()
- fetestexcept()
- feupdateenv()
- finite()
- finitef()
- floor()
- floorf()
- floorl()
- fma()
- fmaf()
- fmal()
- fmax()
- fmaxf()
- fmaxl()
- fmin()
- fminf()
- fminl()
- fmod()
- fmodf()
- fmodl()
- frexp()
- frexpf()
- frexpl()
- hypot()
- hypotf()
- hypotl()
- ilogb()
- ilogbf()
- ilogbl()
- j0()
- j0f()
- j1()
- j1f()
- jn()
- jnf()
- ldexp()
- ldexpf()
- ldexpl()
- lgamma()
- lgammaf()
- lgammal()
- lgammal_r()
- llrint()
- llrintf()
- llrintl()
- llround()
- llroundf()
- llroundl()
- log()
- log10()
- log10f()
- log10l()
- log1p()
- log1pf()
- log1pl()
- log2()
- log2f()
- log2l()
- logb()
- logbf()
- logbl()
- logf()
- logl()
- lrint()
- lrintf()
- lrintl()
- lround()
- lroundf()
- lroundl()
- modf()
- modff()
- modfl()
- nan()
- nanf()
- nanl()
- nearbyint()
- nearbyintf()
- nearbyintl()
- nextafter()
- nextafterf()
- nextafterl()
- nexttoward()
- nexttowardf()
- nexttowardl()
- pow()
- pow10()
- pow10f()
- pow10l()
- powf()
- powf10()
- powl()
- powl10()
- remainder()
- remainderf()
- remainderl()
- remquo()
- remquof()
- remquol()
- rint()
- rintf()
- rintl()
- round()
- roundf()
- roundl()
- scalb()
- scalbf()
- scalbln()
- scalblnf()
- scalblnl()
- scalbn()
- scalbnf()
- scalbnl()
- significand()
- significandf()
- sin()
- sincos()
- sincosf()
- sincosl()
- sinf()
- sinh()
- sinhf()
- sinhl()
- sinl()
- sqrt()
- sqrtf()
- sqrtl()
- tan()
- tanf()
- tanh()
- tanhf()
- tanhl()
- tanl()
- tgamma()
- tgammaf()
- tgammal()
- trunc()
- truncf()
- truncl()
- y0()
- y0f()
- y1()
- y1f()
- yn()
- ynf()
MATH
Overview
Provides math functions, such as trigonometric, exponential, logarithmic functions,and perform operations on complex numbers.
Since:
1.0
Version:
1.0
Summary
Files
Declares functions to perform operations on complex numbers. |
|
Declares specific functions for performing operations for floating-point exceptions and rounding modes. |
|
Data Structures
Macros
Indicates an invalid floating-point exception. At least one parameter value is not defined in the function. |
|
Indicates a pole error exception. The return value is asymptotically infinite when the divisor is zero or the input is asymptotic to zero. |
|
Indicates an overflow floating-point exception. The result is too large to be represented in the normal return value. |
|
Indicates an underflow floating-point exception. The result is too small to be represented in the normal return value. |
|
Indicates bitwise OR of all the preceding supported floating-point exceptions. |
|
FE_DFL_ENV ((const fenv_t ) -1) |
|
HUGE_VALF INFINITY |
|
HUGE_VAL ((double)INFINITY) |
|
HUGE_VALL ((long double)INFINITY) |
|
Indicates an error that occurs in floating-point operations. |
|
Indicates the error handling mechanism employed by math functions. |
|
FP_ILOGB0 FP_ILOGBNAN |
Indicates the calculation result of ilogb(0). |
isinf(x) |
|
isnan(x) |
|
isnormal(x) |
Checks whether the floating-point value x is a normal value. |
isfinite(x) |
|
signbit(x) |
Checks whether the sign of the floating-point value x is negative. |
isunordered(x, y) (isnan((x)) ? ((void)(y),1) : isnan((y))) |
|
isless(x, y) tg_pred_2(x, y, isless) |
|
islessequal(x, y) tg_pred_2(x, y, islessequal) |
Checks whether floating-point value x is less than or equal to y. |
islessgreater(x, y) tg_pred_2(x, y, islessgreater) |
Checks whether floating-point value x is either less than or greater than y. |
isgreater(x, y) tg_pred_2(x, y, isgreater) |
|
isgreaterequal(x, y) tg_pred_2(x, y, isgreaterequal) |
Checks whether floating-point value x is greater than or equal to y. |
M_2_SQRTPI 1.12837916709551257390 / 2/sqrt(pi) / |
|
M_SQRT2 1.41421356237309504880 / sqrt(2) / |
|
M_SQRT1_2 0.70710678118654752440 / 1/sqrt(2) */ |
Typedefs
Functions
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex Calculates the inverse hyperbolic cosine of the complex number z. |
|
float complex Calculates the inverse hyperbolic cosine of the complex number z. |
|
long double complex Calculates the inverse hyperbolic cosine of the complex number z. |
|
double complex Calculates the inverse hyperbolic sine of the complex number z. |
|
float complex Calculates the inverse hyperbolic sine of the complex number z. |
|
long double complex Calculates the inverse hyperbolic sine of the complex number z. |
|
double complex Calculates the inverse hyperbolic tangent of the complex number z. |
|
float complex Calculates the inverse hyperbolic tangent of the complex number z. |
|
long double complex Calculates the inverse hyperbolic tangent of the complex number z. |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex Calculates the natural (base-e) logarithm of the complex number z. |
|
float complex Calculates the natural (base-e) logarithm of the complex number z. |
|
long double complex Calculates the natural (base-e) logarithm of the complex number z. |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex |
|
float complex |
|
long double complex |
|
double complex Calculates the projection of the complex number z onto the Riemann sphere. |
|
float complex Calculates the projection of the complex number z onto the Riemann sphere. |
|
long double complex Calculates the projection of the complex number z onto the Riemann sphere. |
|
feclearexcept (int excepts) |
|
fegetexceptflag (fexcept_t flagp, int excepts) |
Stores the floating-point exceptions specified by excepts into the flagp variable address. |
feraiseexcept (int excepts) |
|
fesetexceptflag (const fexcept_t flagp, int excepts) |
Sets the exception status flag by copying the floating-point exceptions stored in the flagp address to the excepts parameter. |
fetestexcept (int excepts) |
Checks whether the floating-point exceptions specified by excepts have been raised. |
fegetround (void) |
Obtains the macro corresponding to the current rounding mode. |
fesetround (int rounding_mode) |
|
Stores the current floating-point environment into the object specified by envp. |
|
feholdexcept (fenv_t envp) |
Stores the current floating-point environment into the object specified by envp, with all status flags cleared. |
feupdateenv (const fenv_t envp) |
Updates the current floating-point environment from the object specified by envp. |
acos (double x) |
|
acosf (float x) |
|
acosl (long double x) |
|
acosh (double x) |
Calculates the inverse hyperbolic cosine of the double value x. |
acoshf (float x) |
|
acoshl (long double x) |
Calculates the inverse hyperbolic cosine of the long double value x. |
asin (double x) |
|
asinf (float x) |
|
asinl (long double x) |
|
asinh (double x) |
Calculates the inverse hyperbolic sine of the double value x. |
asinhf (float x) |
Calculates the inverse hyperbolic sine of the float value x. |
asinhl (long double x) |
Calculates the inverse hyperbolic sine of the long double value x. |
atan (double x) |
|
atanf (float x) |
|
atanl (long double x) |
|
atan2 (double y, double x) |
|
atan2f (float y, float x) |
|
atan2l (long double y, long double x) |
Calculates the arc tangent of two long double values x and y. |
atanh (double x) |
Calculates the inverse hyperbolic tangent of the double value x. |
atanhf (float x) |
Calculates the inverse hyperbolic tangent of the float value x. |
atanhl (long double x) |
Calculates the inverse hyperbolic tangent of the long double value x. |
cbrt (double x) |
|
cbrtf (float x) |
|
cbrtl (long double x) |
|
ceil (double x) |
Calculates the minimum integer greater than or equal to the double value x. |
ceilf (float x) |
Calculates the minimum integer greater than or equal to the float value x. |
ceill (long double x) |
Calculates the minimum integer greater than or equal to the long double value x. |
copysign (double x, double y) |
Generates a value by combining the magnitude of the double value x and the sign of the double value y. |
copysignf (float x, float y) |
Generates a value by combining the magnitude of the float value x and the sign of the float value y. |
copysignl (long double x, long double y) |
Generates a value by combining the magnitude of the long double value x and the sign of the long double value y. |
cos (double x) |
|
cosf (float x) |
|
cosl (long double x) |
|
cosh (double x) |
|
coshf (float x) |
|
coshl (long double x) |
Calculates the hyperbolic cosine of the long double value x. |
erf (double x) |
|
erff (float x) |
|
erfl (long double x) |
|
erfc (double x) |
Calculates the complementary error function of the double value x. |
erfcf (float x) |
Calculates the complementary error function of the float value x. |
erfcl (long double x) |
Calculates the complementary error function of the long double value x. |
exp (double x) |
Calculates the base-e exponential function of the double value x. |
expf (float x) |
Calculates the base-e exponential function of the float value x. |
expl (long double x) |
Calculates the base-e exponential function of the long double value x. |
exp2 (double x) |
Calculates the base-2 exponential function of the double value x. |
exp2f (float x) |
Calculates the base-2 exponential function of the float value x. |
exp2l (long double x) |
Calculates the base-2 exponential function of the long double value x. |
expm1 (double x) |
Calculates e raised to the power of the double value x minus one, that is, (e^x)-1. |
expm1f (float x) |
Calculates e raised to the power of the float value x minus one. |
expm1l (long double x) |
Calculates e raised to the power of the long double value x minus one. |
fabs (double x) |
|
fabsf (float x) |
|
fabsl (long double x) |
|
fdim (double x, double y) |
Calculates the positive difference between the double value x and y. |
fdimf (float x, float y) |
Calculates the positive difference between the float value x and y. |
fdiml (long double x, long double y) |
Calculates the positive difference between the long double value x and y. |
floor (double x) |
Obtains the largest integer less than or equal to the double value x. |
floorf (float x) |
Obtains the largest integer less than or equal to the float value x. |
floorl (long double x) |
Obtains the largest integer less than or equal to the long double value x. |
fma (double x, double y, double z) |
|
fmaf (float x, float y, float z) |
|
fmal (long double x, long double y, long double z) |
|
fmax (double x, double y) |
|
fmaxf (float x, float y) |
|
fmaxl (long double x, long double y) |
|
fmin (double x, double y) |
|
fminf (float x, float y) |
|
fminl (long double x, long double y) |
Obtains the smaller value of two long double values x and y. |
fmod (double x, double y) |
Calculates the remainder of the double value x divided by the double value y. |
fmodf (float x, float y) |
Calculates the remainder of the float value x divided by the float value y. |
fmodl (long double x, long double y) |
Calculates the remainder of the long double value x divided by the long double value y. |
Decomposes the double value x into a significand and an integral exponent for 2. |
|
Decomposes float value x into a binary significand and an integral exponent for 2. |
|
Decomposes long double value x into a binary significand and an integral exponent for 2. |
|
hypot (double x, double y) |
Calculates the hypotenuse of a right triangle whose legs are x and y. |
hypotf (float x, float y) |
Calculates the hypotenuse of a right triangle whose legs are x and y. |
hypotl (long double x, long double y) |
Calculates the hypotenuse of a right triangle whose legs are x and y. |
ilogb (double x) |
Obtains the integral part of the logarithm of double value x. |
ilogbf (float x) |
Obtains the integral part of the logarithm of float value x. |
ilogbl (long double x) |
Obtains the integral part of the logarithm of the long double value x. |
Multiplies the double value x by 2 raised to the power of exp. |
|
Multiplies the float value x by 2 raised to the power of exp. |
|
Multiplies the long double value x by 2 raised to the power of exp. |
|
lgamma (double x) |
Calculates the natural logarithm of the absolute value of the gamma function of the double value x. |
lgammaf (float x) |
Calculates the natural logarithm of the absolute value of the gamma function of the float value x. |
lgammal (long double x) |
Calculates the natural logarithm of the absolute value of the gamma function of the long double value x. |
llrint (double x) |
|
llrintf (float x) |
|
llrintl (long double x) |
|
llround (double x) |
Rounds double value x to the nearest integer, rounding away from 0. |
llroundf (float x) |
Rounds float value x to the nearest integer, rounding away from 0. |
llroundl (long double x) |
Rounds long double value x to the nearest integer, rounding away from 0. |
log (double x) |
|
logf (float x) |
|
logl (long double x) |
Calculates the natural logarithm of the long double value x. |
log10 (double x) |
Calculates the common logarithm (logarithm with base 10) of the double value x. |
log10f (float x) |
Calculates the common logarithm (logarithm with base 10) of the float value x. |
log10l (long double x) |
Calculates the common logarithm (logarithm with base 10) of the long double value x. |
log1p (double x) |
Calculates the natural logarithm of one plus the double value x. |
log1pf (float x) |
Calculates the natural logarithm of one plus the float value x. |
log1pl (long double x) |
Calculates the natural logarithm of one plus the long double value x. |
log2 (double x) |
Calculates the binary logarithm (logarithm with base 2) of the double value x. |
log2f (float x) |
Calculates the binary logarithm (logarithm with base 2) of the float value x. |
log2l (long double x) |
Calculates the binary logarithm (logarithm with base 2) of the long double value x. |
logb (double x) |
Calculates the logarithm of the absolute value of the double value x. |
logbf (float x) |
Calculates the logarithm of the absolute value of the float value x. |
logbl (long double x) |
Calculates the logarithm of the absolute value of the long double value x. |
lrint (double x) |
|
lrintf (float x) |
|
lrintl (long double x) |
|
lround (double x) |
Rounds double value x to the nearest integer, rounding away from 0. |
lroundf (float x) |
Rounds the float value x to the nearest integer, rounding away from 0. |
lroundl (long double x) |
Rounds the long double value x to the nearest integer, rounding away from 0. |
modf (double x, double iptr) |
Breaks the double value x into a signed integral and a fractional part. |
modff (float x, float iptr) |
Breaks the float value x into a signed integral and a fractional part. |
modfl (long double x, long double iptr) |
Breaks the long double value x into a signed integral and a fractional part. |
nan (const char tagp) |
|
nanf (const char tagp) |
|
nanl (const char tagp) |
|
nearbyint (double x) |
Rounds the double value x to an integer in floating-point format. |
nearbyintf (float x) |
Rounds the float value x to an integer in floating-point format. |
nearbyintl (long double x) |
Rounds the long double value x to an integer in floating-point format. |
nextafter (double x, double y) |
Obtains the next representable value following the double value x in the direction of the double value y. |
nextafterf (float x, float y) |
Obtains the next representable value following the float value x in the direction of the float value y. |
nextafterl (long double x, long double y) |
Obtains the next representable value following the long double value x in the direction of the long double value y. |
nexttoward (double x, long double y) |
Obtains the next representable value following the double value x in the direction of the long double value y. |
nexttowardf (float x, long double y) |
Obtains the next representable value following the float value x in the direction of the long double value y. |
nexttowardl (long double x, long double y) |
Obtains the next representable value following the long double value x in the direction of the long double value y. |
pow (double x, double y) |
Obtains the double value x raised to the power of the double value y. |
powf (float x, float y) |
Obtains the float value x raised to the power of the float value y. |
powf10 (float x) |
|
powl (long double x, long double y) |
Obtains the long double value x raised to the power of the long double value y. |
powl10 (long double x) |
|
remainder (double x, double y) |
Calculates the remainder of the double value x divided by the double value y. |
remainderf (float x, float y) |
Calculates the remainder of the float value x divided by the float value y. |
remainderl (long double x, long double y) |
Calculates the remainder of the long double value x divided by the long double value y. |
remquo (double x, double y, int quo) |
Calculates the quotient and remainder of the double value x divided by the double value y. |
remquof (float x, float y, int quo) |
Calculates the quotient and remainder of the float value x divided by the float value y. |
remquol (long double x, long double y, int quo) |
Calculates the quotient and remainder of the long double value x divided by the long double value y. |
rint (double x) |
|
rintf (float x) |
|
rintl (long double x) |
|
round (double x) |
Rounds the double value x to the nearest integer, rounding away from 0. |
roundf (float x) |
Rounds the float value x to the nearest integer, rounding away from 0. |
roundl (long double x) |
Rounds the long double value x to the nearest integer, rounding away from 0. |
Multiplies the double value x by FLT_RADIX raised to the power of the long int value exp, that is, x(FLT_RADIX)^exp. |
|
Multiplies the float value x by FLT_RADIX raised to the power of the long int value exp, that is, x(FLT_RADIX)^exp. |
|
Multiplies the long double value x by FLT_RADIX raised to the power of the long int value exp, that is, x(FLT_RADIX)^exp. |
|
Multiplies the double value x by FLT_RADIX raised to the power of the int value exp, that is, x(FLT_RADIX)^exp. |
|
Multiplies the float value x by FLT_RADIX raised to the power of the int value exp, that is, x(FLT_RADIX)^exp. |
|
Multiplies the long double value x by FLT_RADIX raised to the power of the int value exp, that is, x(FLT_RADIX)^exp. |
|
sin (double x) |
|
sinf (float x) |
|
sinl (long double x) |
|
sinh (double x) |
|
sinhf (float x) |
|
sinhl (long double x) |
|
sqrt (double x) |
|
sqrtf (float x) |
|
sqrtl (long double x) |
|
tan (double x) |
|
tanf (float x) |
|
tanl (long double x) |
|
tanh (double x) |
|
tanhf (float x) |
|
tanhl (long double x) |
Calculates the hyperbolic tangent of the long double value x. |
tgamma (double x) |
|
tgammaf (float x) |
|
tgammal (long double x) |
|
trunc (double x) |
Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the double value x. |
truncf (float x) |
Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the float value x. |
truncl (long double x) |
Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the long double value x. |
j0 (double x) |
Calculates the Bessel function of the first kind of order 0 for the double value x. |
j1 (double x) |
Calculates the Bessel function of the first kind of order 1 for the double value x. |
jn (int n, double x) |
Calculates the Bessel function of the first kind of order n for the double value x. |
y0 (double x) |
Calculates the Bessel function of the second kind of order 0 for the double value x. |
y1 (double x) |
Calculates the Bessel function of the second kind of order 1 for the double value x. |
yn (int n, double x) |
Calculates the Bessel function of the second kind of order n for the double value x. |
finite (double x) |
Checks whether the double value x is an infinity or a NaN value. |
finitef (float x) |
Checks whether the float value x is an infinity or a NaN value. |
Multiplies the double value x by FLT_RADIX raised to the power of the double value exp, that is, xFLT_RADIX^exp. |
|
Multiplies the float value x by FLT_RADIX raised to the power of the float value exp, that is, xFLT_RADIX^exp. |
|
significand (double x) |
Obtains the significand of the double value x scaled to the range [1,2). |
significandf (float x) |
Obtains the significand of the float value x scaled to the range [1,2). |
j0f (float x) |
Calculates the Bessel function of the first kind of order 0 for the float value x. |
j1f (float x) |
Calculates the Bessel function of the first kind of order 1 for the float value x. |
jnf (int n, float x) |
Calculates the Bessel function of the first kind of order n for the float value x. |
y0f (float x) |
Calculates the Bessel function of the second kind of order 0 for the float value x. |
y1f (float x) |
Calculates the Bessel function of the second kind of order 1 for the float value x. |
ynf (int n, float x) |
Calculates the Bessel function of the second kind of order n for the float value x. |
lgammal_r (long double x, int signp) |
Calculates the natural logarithm of the absolute value of the gamma function of the double value x. |
exp10 (double x) |
Calculates the base-10 exponential function of the double value x. |
exp10f (float x) |
Calculates the base-10 exponential function of the float value x. |
exp10l (long double x) |
Calculates the base-10 exponential function of the long double value x. |
pow10 (double x) |
Calculates the value of 10 raised to the power x, which is a double value. |
pow10f (float x) |
Calculates the value of 10 raised to the power x, which is a float value. |
pow10l (long double x) |
Calculates the value of 10 raised to the power x, which is a long double value. |
Details
Macro Definition Documentation
isfinite
#define isfinite( x)
Values:( \
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) < 0x7f800000 : \
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) < 0x7ffULL<<52 : \
__fpclassifyl(x) > [FP_INFINITE](MATH.md#ga4f64bcc64f8b84dd9daf5a4e56abf0ca))
Description:
Checks whether the floating-point value x is finite.
A finite value is any value that is neither an infinity nor a NaN value.
Parameters:
x | Indicates the floating-point value x to check. |
Returns:
Returns 1 if x is finite; returns 0 otherwise.
isgreater
#define isgreater( x, y ) __tg_pred_2(x, y, __isgreater)
Description:
Checks whether floating-point value x is greater than y.
Parameters:
x | Indicates the floating-point value x to check. |
y | Indicates the floating-point value y to check. |
Attention:
If either or both of x and y are a NaN value, an exception occurs. This function requires hardware support.
Returns:
Returns 1 if x is greater than y; returns 0 otherwise.
isgreaterequal
#define isgreaterequal( x, y ) __tg_pred_2(x, y, __isgreaterequal)
Description:
Checks whether floating-point value x is greater than or equal to y.
Parameters:
x | Indicates the floating-point value x to check. |
y | Indicates the floating-point value y to check. |
Attention:
If either or both of x and y are a NaN value, an exception occurs. This function requires hardware support.
Returns:
Returns 1 if x is greater than or equal to y; returns 0 otherwise.
isinf
#define isinf( x)
Values:( \
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) == 0x7f800000 : \
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) == 0x7ffULL<<52 : \
__fpclassifyl(x) == [FP_INFINITE](MATH.md#ga4f64bcc64f8b84dd9daf5a4e56abf0ca))
Description:
Checks whether the floating-point value x is an infinity.
Parameters:
x | Indicates the floating-point value x to check. |
Returns:
Returns 1 if x is an infinity; returns 0 otherwise.
isless
#define isless( x, y ) __tg_pred_2(x, y, __isless)
Description:
Checks whether floating-point value x is less than y.
Parameters:
x | Indicates the floating-point value x to check. |
y | Indicates the floating-point value y to check. |
Attention:
If either or both of x and y are a NaN value, an exception occurs. This function requires hardware support.
Returns:
Returns 1 if x is less than y; returns 0 otherwise.
islessequal
#define islessequal( x, y ) __tg_pred_2(x, y, __islessequal)
Description:
Checks whether floating-point value x is less than or equal to y.
Parameters:
x | Indicates the floating-point value x to check. |
y | Indicates the floating-point value y to check. |
Attention:
If either or both of x and y are a NaN value, an exception occurs. This function requires hardware support.
Returns:
Returns 1 if x is less than or equal to y; returns 0 otherwise.
islessgreater
#define islessgreater( x, y ) __tg_pred_2(x, y, __islessgreater)
Description:
Checks whether floating-point value x is either less than or greater than y.
Parameters:
x | Indicates the floating-point value x to check. |
y | Indicates the floating-point value y to check. |
Attention:
If either or both of x and y are a NaN value, an exception occurs. This function requires hardware support.
Returns:
Returns 1 if x is either less than or greater than y; returns 0 otherwise.
isnan
#define isnan( x)
Values:( \
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) > 0x7f800000 : \
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) > 0x7ffULL<<52 : \
__fpclassifyl(x) == [FP_NAN](MATH.md#ga1d481cc6e6a8ff729147ed46e61a4c9f))
Description:
Checks whether the floating-point value x is a NaN value.
Parameters:
x | Indicates the floating-point value x to check. |
Returns:
Returns a non-zero value if x is a NaN value; returns 0 otherwise.
isnormal
#define isnormal( x)
Values:( \
sizeof(x) == sizeof(float) ? ((__FLOAT_BITS(x)+0x00800000) & 0x7fffffff) >= 0x01000000 : \
sizeof(x) == sizeof(double) ? ((__DOUBLE_BITS(x)+(1ULL<<52)) & -1ULL>>1) >= 1ULL<<53 : \
__fpclassifyl(x) == [FP_NORMAL](MATH.md#gab9e29bb9e853934c4ba647c840b7e5de))
Description:
Checks whether the floating-point value x is a normal value.
A normal value refers to any value that is not an infinity, a NaN value, or 0.
Parameters:
x | Indicates the floating-point value x to check. |
Returns:
Returns a non-zero value if x is a normal value; returns 0 otherwise.
isunordered
#define isunordered( x, y ) ([isnan]($api-api-SmartVision-Devices-MATH.md#ga2e1baae9134e580910322362dc23290e)((x)) ? ((void)(y),1) : [isnan]($api-api-SmartVision-Devices-MATH.md#ga2e1baae9134e580910322362dc23290e)((y)))
Description:
Checks whether floating-point value x or y is unordered.
An unordered value refers to a NaN value.
Parameters:
x | Indicates the floating-point value x to check. |
y | Indicates the floating-point value y to check. |
Returns:
Returns 1 if either x or y is unordered; returns 0 otherwise.
signbit
#define signbit( x)
Values:( \
sizeof(x) == sizeof(float) ? (int)(__FLOAT_BITS(x)>>31) : \
sizeof(x) == sizeof(double) ? (int)(__DOUBLE_BITS(x)>>63) : \
__signbitl(x) )
Description:
Checks whether the sign of the floating-point value x is negative.
Parameters:
x | Indicates the floating-point value x to check. |
Returns:
Returns a non-zero value if the sign of x is negative; returns 0 otherwise.
Function Documentation
acos()
double acos (double x)
Description:
Calculates the arc cosine of the double value x.
Parameters:
x | Indicates the double value whose arc cosine is to be calculated. |
Returns:
Returns the arc cosine of x in radians, ranging from 0 to M_PI. If x is a NaN value, this function returns a NaN value. If x is +1, this function returns +0. If x is a positive or negative infinity, this function returns a NaN value and reports a domain error. If x is out of the range [-1, 1], this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
acosf()
float acosf (float x)
Description:
Calculates the arc cosine of the float value x.
Parameters:
x | Indicates the float value whose arc cosine is to be calculated. |
Returns:
Returns the arc cosine of x in radians, ranging from 0 to M_PI. If x is a NaN value, this function returns a NaN value. If x is +1, this function returns +0. If x is a positive or negative infinity, this function returns a NaN value and reports a domain error. If x is out of the range [-1, 1], this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
acosh()
double acosh (double x)
Description:
Calculates the inverse hyperbolic cosine of the double value x.
Parameters:
x | Indicates the double value whose inverse hyperbolic cosine is to be calculated. |
Returns:
Returns the inverse hyperbolic cosine of x. If x is a NaN value, this function returns a NaN value. If x is +1, this function returns +0. If x is a positive infinity, this function returns a positive infinity. If x is less than 1, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
acoshf()
float acoshf (float x)
Description:
Calculates the inverse hyperbolic cosine of float value x.
Parameters:
x | Indicates the float value whose inverse hyperbolic cosine is to be calculated. |
Returns:
Returns the inverse hyperbolic cosine of x. If x is a NaN value, this function returns a NaN value. If x is +1, this function returns +0. If x is a positive infinity, this function returns a positive infinity. If x is less than 1, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
acoshl()
long double acoshl (long double x)
Description:
Calculates the inverse hyperbolic cosine of the long double value x.
Parameters:
x | Indicates the long double value whose inverse hyperbolic cosine is to be calculated. |
Returns:
Returns the inverse hyperbolic cosine of x. If x is a NaN value, this function returns a NaN value. If x is +1, this function returns +0. If x is a positive infinity, this function returns a positive infinity. If x is less than 1, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
acosl()
long double acosl (long double x)
Description:
Calculates the arc cosine of the long double value x.
Parameters:
x | Indicates the long double value whose arc cosine is to be calculated. |
Returns:
Returns the arc cosine of x in radians, ranging from 0 to M_PI. If x is a NaN value, this function returns a NaN value. If x is +1, this function returns +0. If x is a positive or negative infinity, this function returns a NaN value and reports a domain error. If x is out of the range [-1, 1], this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
asin()
double asin (double x)
Description:
Calculates the arc sine of the double value x.
Parameters:
x | Indicates the double value whose arc sine is to be calculated. |
Returns:
Returns the arc sine of x in radians, ranging from -M_PI_2 to M_PI_2. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0. If x is out of the range [-1, 1], this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
asinf()
float asinf (float x)
Description:
Calculates the arc sine of the float value x.
Parameters:
x | Indicates the float value whose arc sine is to be calculated. |
Returns:
Returns the arc sine of x in radians, ranging from -M_PI_2 to M_PI_2. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0. If x is out of the range [-1, 1], this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
asinh()
double asinh (double x)
Description:
Calculates the inverse hyperbolic sine of the double value x.
Parameters:
x | Indicates the double value whose inverse hyperbolic sine is to be calculated. |
Returns:
Returns the inverse hyperbolic sine of x. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0. If x is a positive or negative infinity, this function returns a positive or negative infinity.
asinhf()
float asinhf (float x)
Description:
Calculates the inverse hyperbolic sine of the float value x.
Parameters:
x | Indicates the float value whose inverse hyperbolic sine is to be calculated. |
Returns:
Returns the inverse hyperbolic sine of x. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0. If x is a positive or negative infinity, this function returns a positive or negative infinity.
asinhl()
long double asinhl (long double x)
Description:
Calculates the inverse hyperbolic sine of the long double value x.
Parameters:
x | Indicates the long double value whose inverse hyperbolic sine is to be calculated. |
Returns:
Returns the inverse hyperbolic sine of x. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0. If x is a positive or negative infinity, this function returns a positive or negative infinity.
asinl()
long double asinl (long double x)
Description:
Calculates the arc sine of the long double value x.
Parameters:
x | Indicates the long double value whose arc sine is to be calculated. |
Returns:
Returns the arc sine of x in radians, ranging from -M_PI_2 to M_PI_2. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0. If x is out of the range [-1, 1], this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
atan()
double atan (double x)
Description:
Calculates the arc tangent of the double value x.
Parameters:
x | Indicates the double value whose arc tangent is to be calculated. |
Returns:
Returns the principal value of the arc tangent of x in radians, ranging from -M_PI_2 to M_PI_2. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns M_PI_2.
atan2()
double atan2 (double y, double x )
Description:
Calculates the arc tangent of two double values x and y.
Parameters:
y | Indicates the double value y for calculating the arc tangent. |
x | Indicates the double value x for calculating the arc tangent. |
Returns:
Returns the principal value of the arc tangent of y/x in radians, ranging from -M_PI to M_PI. If y is +0 or -0, and x is less than 0, this function returns +M_PI or -M_PI, respectively. If y is +0 or -0, and x is greater than 0, this function returns +0 or -0, respectively. If y is less than 0 and x is either +0 or -0, this function returns -M_PI_2. If y is greater than 0 and x is either +0 or -0, this function returns M_PI_2. If x or y is a NaN value, this function returns a NaN value. If y is +0 or -0, and x is -0, this function returns +M_PI or -M_PI, respectively. If y is +0 or -0, and x is +0, this function returns +0 or -0, respectively. If y is a finite value greater than or less than 0, and x is a negative infinity, this function returns +M_PI or -M_PI, respectively. If y is a finite value greater than or less than 0, and x is a positive infinity, this function returns +0 or -0, respectively. If y is a positive or negative infinity, and x is a finite value, this function returns M_PI_2 or -M_PI_2, respectively. If y is a positive or negative infinity, and x is a negative infinity, this function returns +3*M_PI_4 or -3*M_PI_4, respectively. If y is a positive or negative infinity, and x is a positive infinity, this function returns +M_PI_4 or -M_PI_4, respectively.
atan2f()
float atan2f (float y, float x )
Description:
Calculates the arc tangent of two float values x and y.
Parameters:
y | Indicates the float value y for calculating the arc tangent. |
x | Indicates the float value x for calculating the arc tangent. |
Returns:
Returns the principal value of the arc tangent of y/x in radians, ranging from -M_PI to M_PI. If y is +0 or -0, and x is less than 0, this function returns +M_PI or -M_PI, respectively. If y is +0 or -0, and x is greater than 0, this function returns +0 or -0, respectively. If y is less than 0 and x is either +0 or -0, this function returns -M_PI_2. If y is greater than 0 and x is either +0 or -0, this function returns M_PI_2. If x or y is a NaN value, this function returns a NaN value. If y is +0 or -0, and x is -0, this function returns +M_PI or -M_PI, respectively. If y is +0 or -0, and x is +0, this function returns +0 or -0, respectively. If y is a finite value greater than or less than 0, and x is a negative infinity, this function returns +M_PI or -M_PI, respectively. If y is a finite value greater than or less than 0, and x is a positive infinity, this function returns +0 or -0, respectively. If y is a positive or negative infinity, and x is a finite value, this function returns M_PI_2 or -M_PI_2, respectively. If y is a positive or negative infinity, and x is a negative infinity, this function returns +3*M_PI_4 or -3*M_PI_4, respectively. If y is a positive or negative infinity, and x is a positive infinity, this function returns +M_PI_4 or -M_PI_4, respectively.
atan2l()
long double atan2l (long double y, long double x )
Description:
Calculates the arc tangent of two long double values x and y.
Parameters:
y | Indicates the long double value y for calculating the arc tangent. |
x | Indicates the long double value x for calculating the arc tangent. |
Returns:
Returns the principal value of the arc tangent of y/x in radians, ranging from -M_PI to M_PI. If y is +0 or -0, and x is less than 0, this function returns +M_PI or -M_PI, respectively. If y is +0 or -0, and x is greater than 0, this function returns +0 or -0, respectively. If y is less than 0 and x is either +0 or -0, this function returns -M_PI_2. If y is greater than 0 and x is either +0 or -0, this function returns M_PI_2. If x or y is a NaN value, this function returns a NaN value. If y is +0 or -0, and x is -0, this function returns +M_PI or -M_PI, respectively. If y is +0 or -0, and x is +0, this function returns +0 or -0, respectively. If y is a finite value greater than or less than 0, and x is a negative infinity, this function returns +M_PI or -M_PI, respectively. If y is a finite value greater than or less than 0, and x is a positive infinity, this function returns +0 or -0, respectively. If y is a positive or negative infinity, and x is a finite value, this function returns M_PI_2 or -M_PI_2, respectively. If y is a positive or negative infinity, and x is a negative infinity, this function returns +3*M_PI_4 or -3*M_PI_4, respectively. If y is a positive or negative infinity, and x is a positive infinity, this function returns +M_PI_4 or -M_PI_4, respectively.
atanf()
float atanf (float x)
Description:
Calculates the arc tangent of the float value x.
Parameters:
x | Indicates the float value whose arc tangent is to be calculated. |
Returns:
Returns the principal value of the arc tangent of x in radians, ranging from -M_PI_2 to M_PI_2. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns M_PI_2 or -M_PI_2, respectively.
atanh()
double atanh (double x)
Description:
Calculates the inverse hyperbolic tangent of the double value x.
Parameters:
x | Indicates the double value whose inverse hyperbolic tangent is to be calculated. |
Returns:
Returns the inverse hyperbolic tangent of x. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is +1 or -1, this function returns HUGE_VAL, reports a pole error, sets errno to EDOM, and throws the FE_INVALID exception. If the absolute value of x is greater than 1, this function returns a NaN value, reports a domain error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception.
atanhf()
float atanhf (float x)
Description:
Calculates the inverse hyperbolic tangent of the float value x.
Parameters:
x | Indicates the float value whose inverse hyperbolic tangent is to be calculated. |
Returns:
Returns the inverse hyperbolic tangent of x. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is +1 or -1, this function returns HUGE_VAL, reports a pole error, sets errno to EDOM, and throws the FE_INVALID exception. If the absolute value of x is greater than 1, this function returns a NaN value, reports a domain error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception.
atanhl()
long double atanhl (long double x)
Description:
Calculates the inverse hyperbolic tangent of the long double value x.
Parameters:
x | Indicates the long double value whose inverse hyperbolic tangent is to be calculated. |
Returns:
Returns the inverse hyperbolic tangent of x. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is +1 or -1, this function returns HUGE_VAL, reports a pole error, sets errno to EDOM, and throws the FE_INVALID exception. If the absolute value of x is greater than 1, this function returns a NaN value, reports a domain error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception.
atanl()
long double atanl (long double x)
Description:
Calculates the arc tangent of the long double value x.
Parameters:
x | Indicates the long double value whose arc tangent is to be calculated. |
Returns:
Returns the principal value of the arc tangent of x in radians, ranging from -M_PI_2 to M_PI_2. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns M_PI_2 or -M_PI_2, respectively.
cabs()
double cabs (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the absolute value of the complex number z.
Parameters:
z | Indicates the complex number (a double value) whose absolute value is to be obtained. |
Attention:
If an error occurs or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula hypot(cimag(z) + creal(z)).
Returns:
Returns the absolute value of z if the operation is successful.
cabsf()
float cabsf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the absolute value of the complex number z.
Parameters:
z | Indicates the complex number (a float value) whose absolute value is to be obtained. |
Attention:
If an error occurs or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula hypot(cimag(z) + creal(z)).
Returns:
Returns the absolute value of z if the operation is successful.
cabsl()
long double cabsl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the absolute value of the complex number z.
Parameters:
z | Indicates the complex number (a long double value) whose absolute value is to be obtained. |
Attention:
If an error occurs or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula hypot(cimag(z) + creal(z)).
Returns:
Returns the absolute value of z if the operation is successful.
cacos()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacos (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose arc cosine is to be obtained. |
Returns:
Returns the arc cosine of z if the operation is successful. If x is +0 or -0 and y is 0, this function returns M_PI_2 - 0i. If x is +0 or -0 and y is NAN, this function returns M_PI_2 + NANi. If x is not an infinity and y is an infinity, this function returns M_PI_2 - HUGE_VALi. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns M_PI - HUGE_VALi. If x is a negative infinity and y is a positive infinity, this function returns 3*M_PI_4 - HUGE_VALi. If x and y are both positive infinity, this function returns M_PI_4 - HUGE_VALi. If x is a positive or negative infinity and y is NAN, this function returns NAN +(-) HUGE_VALi (the sign bit of the imaginary part of the returned value is uncertain). If x is NAN and y is not an infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns NAN - HUGE_VALi. If x and y are both NAN, this function returns NAN + NANi.
cacosf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacosf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose arc cosine is to be obtained. |
Returns:
Returns the arc cosine of z if the operation is successful. If x is +0 or -0 and y is 0, this function returns M_PI_2 - 0i. If x is +0 or -0 and y is NAN, this function returns M_PI_2 + NANi. If x is not an infinity and y is an infinity, this function returns M_PI_2-HUGE_VALFi. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns M_PI - HUGE_VALFi. If x is a negative infinity and y is a positive infinity, this function returns 3*M_PI_4 - HUGE_VALFi. If x and y are both positive infinity, this function returns M_PI_4 - HUGE_VALFi. If x is a positive or negative infinity and y is NAN, this function returns NAN +(-) HUGE_VALFi (the sign bit of the imaginary part of the returned value is uncertain). If x is NAN and y is not an infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns NAN - HUGE_VALFi. If x and y are both NAN, this function returns NAN + NANi.
cacosh()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacosh (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose inverse hyperbolic cosine is to be obtained. |
Returns:
Returns the inverse hyperbolic cosine of z if the operation is successful. If x is 0 and y is 0, this function returns M_PI_2i. If x is 0 and y is NAN, this function returns NAN +(-) M_PI_2i (the sign bit of the imaginary part of the returned value is uncertain). If x is not an infinity and y is a positive infinity, this function returns HUGE_VAL + M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VAL + M_PIi. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VAL. If x is a negative infinity and y is a positive infinity, this function returns HUGE_VAL + 3*M_PI_4i. If x is an infinity and y is NAN, this function returns HUGE_VAL + NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns HUGE_VAL + NANi. If x and y are both NAN, this function returns NAN + NANi.
cacoshf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacoshf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose inverse hyperbolic cosine is to be obtained. |
Returns:
Returns the inverse hyperbolic cosine of z if the operation is successful. If x is 0 and y is 0, this function returns M_PI_2i. If x is 0 and y is NAN, this function returns NAN +(-) M_PI_2i (the sign bit of the imaginary part of the returned value is uncertain). If x is not an infinity and y is a positive infinity, this function returns HUGE_VALF + M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VALF + M_PIi. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALF. If x is a negative infinity and y is a positive infinity, this function returns HUGE_VALF + 3*M_PI_4i. If x is an infinity and y is NAN, this function returns HUGE_VALF + NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns HUGE_VALF + NANi. If x and y are both NAN, this function returns NAN + NANi.
cacoshl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacoshl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose inverse hyperbolic cosine is to be obtained. |
Returns:
Returns the inverse hyperbolic cosine of z if the operation is successful. If x is 0 and y is 0, this function returns M_PI_2i. If x is 0 and y is NAN, this function returns NAN +(-) M_PI_2i (the sign bit of the imaginary part of the returned value is uncertain). If x is not an infinity and y is a positive infinity, this function returns HUGE_VALL + M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VALL + M_PIi. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALL. If x is a negative infinity and y is a positive infinity, this function returns HUGE_VALL + 3*M_PI_4i. If x is an infinity and y is NAN, this function returns HUGE_VALL + NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns HUGE_VALL + NANi. If x and y are both NAN, this function returns NAN + NANi.
cacosl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacosl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose arc cosine is to be obtained. |
Returns:
Returns the arc cosine of z if the operation is successful. If x is +0 or -0 and y is 0, this function returns M_PI_2 - 0i. If x is +0 or -0 and y is NAN, this function returns M_PI_2 + NANi. If x is not an infinity and y is an infinity, this function returns M_PI_2-HUGE_VALLi. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns M_PI - HUGE_VALLi. If x is a negative infinity and y is a positive infinity, this function returns 3*M_PI_4 - HUGE_VALLi. If x and y are both positive infinity, this function returns M_PI_4 - HUGE_VALLi. If x is a positive or negative infinity and y is NAN, this function returns NAN +(-) HUGE_VALLi (the sign bit of the imaginary part of the returned value is uncertain). If x is NAN and y is not an infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns NAN - HUGE_VALLi. If x and y are both NAN, this function returns NAN + NANi.
carg()
double carg (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the phase angle of the complex number z.
Parameters:
z | Indicates the complex number (a double value) whose phase angle is to be obtained. |
Attention:
If an error occurs or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula atan2(cimag(z) + creal(z)).
Returns:
Returns the phase angle of z if the operation is successful.
cargf()
float cargf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the phase angle of the complex number z.
Parameters:
z | Indicates the complex number (a float value) whose phase angle is to be obtained. |
Attention:
If an error occurs or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula atan2(cimag(z) + creal(z)).
Returns:
Returns the phase angle of z if the operation is successful.
cargl()
long double cargl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the phase angle of the complex number z.
Parameters:
z | Indicates the complex number (a long double value) whose hyperbolic sine is to be obtained. |
Attention:
If an error occurs or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula atan2(cimag(z) + creal(z)).
Returns:
Returns the phase angle of z if the operation is successful.
casin()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casin (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose arc sine is to be obtained. |
Returns:
Returns the arc sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is a positive finite value and y is a positive infinity, this function returns HUGE_VAL + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VAL. If x and y are both positive infinity, this function returns HUGE_VAL + M_PI_4i. If x is a positive infinity and y is NAN, this function returns HUGE_VAL + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain. If x and y are both NAN, this function returns NAN + NANi.
casinf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose arc sine is to be obtained. |
Returns:
Returns the arc sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is a positive finite value and y is a positive infinity, this function returns HUGE_VALF + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALF. If x and y are both positive infinity, this function returns HUGE_VALF + M_PI_4i. If x is a positive infinity and y is NAN, this function returns HUGE_VALF + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns +(-)HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain. If x and y are both NAN, this function returns NAN + NANi.
casinh()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinh (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose inverse hyperbolic sine is to be obtained. |
Returns:
Returns the inverse hyperbolic sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is a positive finite value and y is a positive infinity, this function returns HUGE_VAL + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VAL. If x and y are both positive infinity, this function returns HUGE_VAL + M_PI_4i. If x is a positive infinity and y is NAN, this function returns HUGE_VAL + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain. If x and y are both NAN, this function returns NAN + NANi.
casinhf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinhf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose inverse hyperbolic sine is to be obtained. |
Returns:
Returns the inverse hyperbolic sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is a positive finite value and y is a positive infinity, this function returns HUGE_VALF + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALF. If x and y are both positive infinity, this function returns HUGE_VALF + M_PI_4i. If x is a positive infinity and y is NAN, this function returns HUGE_VALF + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns +(-)HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain. If x and y are both NAN, this function returns NAN + NANi.
casinhl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinhl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose inverse hyperbolic sine is to be obtained. |
Returns:
Returns the inverse hyperbolic sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is a positive finite value and y is a positive infinity, this function returns HUGE_VALL + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALL. If x and y are both positive infinity, this function returns HUGE_VALL + M_PI_4i. If x is a positive infinity and y is NAN, this function returns HUGE_VALL + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain. If x and y are both NAN, this function returns NAN + NANi.
casinl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose arc sine is to be obtained. |
Returns:
Returns the arc sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is a positive finite value and y is a positive infinity, this function returns HUGE_VALL + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALL. If x and y are both positive infinity, this function returns HUGE_VALL + M_PI_4i. If x is a positive infinity and y is NAN, this function returns HUGE_VALL + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain. If x and y are both NAN, this function returns NAN + NANi.
catan()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catan (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose arc tangent is to be obtained. |
Returns:
Returns the arc tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is NAN, this function returns NANi. If x is 1 and y is 0, this function returns HUGE_VAL and throws the FE_DIVBYZERO exception. If x is a positive finite value and y is a positive infinity, this function returns M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns M_PI_2i. If x and y are both positive infinity, this function returns M_PI_2i. If x is a positive infinity and y is NAN, this function returns NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns M_PI_2i. If x and y are both NAN, this function returns NAN + NANi.
catanf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose arc tangent is to be obtained. |
Returns:
Returns the arc tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is NAN, this function returns NANi. If x is 1 and y is 0, this function returns HUGE_VALF and throws the FE_DIVBYZERO exception. If x is a positive finite value and y is a positive infinity, this function returns M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns M_PI_2i. If x and y are both positive infinity, this function returns M_PI_2i. If x is a positive infinity and y is NAN, this function returns NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns M_PI_2i. If x and y are both NAN, this function returns NAN + NANi.
catanh()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanh (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose inverse hyperbolic tangent is to be obtained. |
Returns:
Returns the inverse hyperbolic tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is NAN, this function returns NANi. If x is 1 and y is 0, this function returns HUGE_VAL and throws the FE_DIVBYZERO exception. If x is a positive finite value and y is a positive infinity, this function returns M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns M_PI_2i. If x and y are both positive infinity, this function returns M_PI_2i. If x is a positive infinity and y is NAN, this function returns NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns M_PI_2i. If x and y are both NAN, this function returns NAN + NANi.
catanhf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanhf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose inverse hyperbolic tangent is to be obtained. |
Returns:
Returns the inverse hyperbolic tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is NAN, this function returns NANi. If x is 1 and y is 0, this function returns HUGE_VALF and throws the FE_DIVBYZERO exception. If x is a positive finite value and y is a positive infinity, this function returns M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns M_PI_2i. If x and y are both positive infinity, this function returns M_PI_2i. If x is a positive infinity and y is NAN, this function returns NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns M_PI_2i. If x and y are both NAN, this function returns NAN + NANi.
catanhl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanhl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the inverse hyperbolic tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose inverse hyperbolic tangent is to be obtained. |
Returns:
Returns the inverse hyperbolic tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is NAN, this function returns NANi. If x is 1 and y is 0, this function returns HUGE_VALL and throws the FE_DIVBYZERO exception. If x is a positive finite value and y is a positive infinity, this function returns M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns M_PI_2i. If x and y are both positive infinity, this function returns M_PI_2i. If x is a positive infinity and y is NAN, this function returns NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns M_PI_2i. If x and y are both NAN, this function returns NAN + NANi.
catanl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the arc tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose arc tangent is to be obtained. |
Returns:
Returns the arc tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is NAN, this function returns NANi. If x is 1 and y is 0, this function returns HUGE_VALL and throws the FE_DIVBYZERO exception. If x is a positive finite value and y is a positive infinity, this function returns M_PI_2i. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns M_PI_2i. If x and y are both positive infinity, this function returns M_PI_2i. If x is a positive infinity and y is NAN, this function returns NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns M_PI_2i. If x and y are both NAN, this function returns NAN + NANi.
cbrt()
double cbrt (double x)
Description:
Calculates the cube root of the double value x.
Parameters:
x | Indicates the double value whose cube root is to be calculated. |
Returns:
Returns the cube root if the operation is successful; returns the passed x if x is +0, -0, a positive or negative infinity, or a NaN value.
cbrtf()
float cbrtf (float x)
Description:
Calculates the cube root of the float value x.
Parameters:
x | Indicates the float value whose cube root is to be calculated. |
Returns:
Returns the cube root if the operation is successful; returns the passed x if x is +0, -0, a positive or negative infinity, or a NaN value.
cbrtl()
long double cbrtl (long double x)
Description:
Calculates the cube root of the long double value x.
Parameters:
x | Indicates the long double value whose cube root is to be calculated. |
Returns:
Returns the cube root if the operation is successful; returns the passed x if x is +0, -0, a positive or negative infinity, or a NaN value.
ccos()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccos (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose cosine is to be obtained. |
Returns:
Returns the cosine of z if the operation is successful. If x and y are both 0, this function returns 1. If x is 0 and y is a positive infinity, this function returns HUGE_VAL. If x is 0 and y is NAN, this function returns NAN. If x is a negative infinity and y is 0, this function returns NAN and throws the FE_INVALID exception. If x is a negative infinity and y is a positive infinity, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a negative infinity and y is neither an infinity nor 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive or negative infinity, this function returns HUGE_VAL + NANi. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ccosf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccosf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose cosine is to be obtained. |
Returns:
Returns the cosine of z if the operation is successful. If x and y are both 0, this function returns 1. If x is 0 and y is a positive infinity, this function returns HUGE_VALF. If x is 0 and y is NAN, this function returns NAN. If x is a negative infinity and y is 0, this function returns NAN and throws the FE_INVALID exception. If x is a negative infinity and y is a positive infinity, this function returns +(-)HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a negative infinity and y is neither an infinity nor 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive or negative infinity, this function returns HUGE_VALF + NANi. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ccosh()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccosh (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose hyperbolic cosine is to be obtained. |
Returns:
Returns the hyperbolic cosine of z if the operation is successful. If x and y are both 0, this function returns 1. If x is 0 and y is a positive infinity, this function returns NAN and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NAN. If x is neither an infinity nor 0 and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a negative infinity and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VAL. If x is a positive infinity and y is a positive infinity, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive or negative infinity and y is NAN, this function returns HUGE_VAL + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is neither an infinity nor 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ccoshf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccoshf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose hyperbolic cosine is to be obtained. |
Returns:
Returns the hyperbolic cosine of z if the operation is successful. If x and y are both 0, this function returns 1. If x is 0 and y is a positive infinity, this function returns NAN and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NAN. If x is neither an infinity nor 0 and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a negative infinity and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VALF. If x is a positive infinity and y is a positive infinity, this function returns +(-)HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive or negative infinity and y is NAN, this function returns HUGE_VALF + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is neither an infinity nor 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ccoshl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccoshl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose hyperbolic cosine is to be obtained. |
Returns:
Returns the hyperbolic cosine of z if the operation is successful. If x and y are both 0, this function returns 1. If x is 0 and y is a positive infinity, this function returns NAN and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NAN. If x is neither an infinity nor 0 and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a negative infinity and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VALL. If x is a positive infinity and y is a positive infinity, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive or negative infinity and y is NAN, this function returns HUGE_VALL + NANi. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is neither an infinity nor 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ccosl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccosl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the cosine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose cosine is to be obtained. |
Returns:
Returns the cosine of z if the operation is successful. If x and y are both 0, this function returns 1. If x is 0 and y is a positive infinity, this function returns HUGE_VALL. If x is 0 and y is NAN, this function returns NAN. If x is a negative infinity and y is 0, this function returns NAN and throws the FE_INVALID exception. If x is a negative infinity and y is a positive infinity, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a negative infinity and y is neither an infinity nor 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is NAN and y is a positive or negative infinity, this function returns HUGE_VALL + NANi. If x is neither an infinity nor 0 and y is NAN, this returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ceil()
double ceil (double x)
Description:
Calculates the minimum integer greater than or equal to the double value x.
Parameters:
x | Indicates the double value x to compare with. |
Returns:
Returns the minimum integer greater than or equal to x if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
ceilf()
float ceilf (float x)
Description:
Calculates the minimum integer greater than or equal to the float value x.
Parameters:
x | Indicates the float value x to compare with. |
Returns:
Returns the minimum integer greater than or equal to x if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
ceill()
long double ceill (long double x)
Description:
Calculates the minimum integer greater than or equal to the long double value x.
Parameters:
x | Indicates the long double value x to compare with. |
Returns:
Returns the minimum integer greater than or equal to x if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
cexp()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cexp (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the base-e exponential of the complex number z.
The mathematical formula is e^z. z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose base-e exponential is to be obtained. |
Returns:
Returns the base-e exponential of z if the operation is successful. If x and y are both 0, this function returns 1. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VAL. If x is a negative infinity and y is an infinity or NAN, this function returns 0. If x is a positive infinity and y is neither an infinity nor 0, this function returns HUGE_VAL*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns HUGE_VAL + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
cexpf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cexpf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the base-e exponential of the complex number z.
The mathematical formula is e^z. z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose base-e exponential is to be obtained. |
Returns:
Returns the base-e exponential of z if the operation is successful. If x and y are both 0, this function returns 1. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VALF. If x is a negative infinity and y is an infinity or NAN, this function returns 0. If x is a positive infinity and y is neither an infinity nor 0, this function returns HUGE_VALF*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-) HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns HUGE_VALF + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
cexpl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cexpl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the base-e exponential of the complex number z.
The mathematical formula is e^z. z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose base-e exponential is to be obtained. |
Returns:
Returns the base-e exponential of z if the operation is successful. If x and y are both 0, this function returns 1. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VALL. If x is a negative infinity and y is an infinity or NAN, this function returns 0. If x is a positive infinity and y is neither an infinity nor 0, this function returns HUGE_VALL*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns HUGE_VALL + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
cimag()
double cimag (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the imaginary part of the complex number z.
Parameters:
z | Indicates the complex number (a double value) whose imaginary part is to be obtained. |
Returns:
Returns the imaginary part of z if the operation is successful.
cimagf()
float cimagf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the imaginary part of the complex number z.
Parameters:
z | Indicates the complex number (a float value) whose imaginary part is to be obtained. |
Returns:
Returns the imaginary part of z if the operation is successful.
cimagl()
long double cimagl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the imaginary part of the complex number z.
Parameters:
z | Indicates the complex number (a long double value) whose imaginary part is to be obtained. |
Returns:
Returns the imaginary part of z if the operation is successful.
clog()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) clog (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the natural (base-e) logarithm of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose natural (base-e) logarithm is to be obtained. |
Returns:
Returns the natural (base-e) logarithm of z if the operation is successful. If x is -0 and y is +0, this function returns -HUGE_VAL + M_PIi and throws the FE_DIVBYZERO exception. If x and y are both +0, this function returns -HUGE_VAL + 0i and throws the FE_DIVBYZERO exception. If x is not an infinity and y is a positive infinity, this function returns HUGE_VAL + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VAL + M_PIi. If x is a negative infinity and y is a positive infinity, this function returns HUGE_VAL + 3*M_PI_4i. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VAL + 0i. If x and y are both positive infinity, this function returns HUGE_VAL + M_PI_4i. If x is an infinity and y is NAN, this function returns HUGE_VAL + NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns HUGE_VAL + NANi. If x and y are both NAN, this function returns NAN + NANi.
clogf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) clogf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the natural (base-e) logarithm of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose natural (base-e) logarithm is to be obtained. |
Returns:
Returns the natural (base-e) logarithm of z if the operation is successful. If x is -0 and y is +0, this function returns -HUGE_VALF + M_PIi and throws the FE_DIVBYZERO exception. If x and y are both +0, this function returns -HUGE_VALF + 0i and throws the FE_DIVBYZERO exception. If x is not an infinity and y is a positive infinity, this function returns HUGE_VALF + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VALF + M_PIi. If x is a negative infinity and y is a positive infinity, this function returns HUGE_VALF + 3*M_PI_4i. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALF + 0i. If x and y are both positive infinity, this function returns HUGE_VALF + M_PI_4i. If x is an infinity and y is NAN, this function returns HUGE_VALF + NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns HUGE_VALF + NANi. If x and y are both NAN, this function returns NAN + NANi.
clogl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) clogl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the natural (base-e) logarithm of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose natural (base-e) logarithm is to be obtained. |
Returns:
Returns the natural (base-e) logarithm of z if the operation is successful. If x is -0 and y is +0, this function returns -HUGE_VALL + M_PIi and throws the FE_DIVBYZERO exception. If x and y are both +0, this function returns -HUGE_VALL + 0i and throws the FE_DIVBYZERO exception. If x is not an infinity and y is a positive infinity, this function returns HUGE_VALL + M_PI_2i. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VALL + M_PIi. If x is a negative infinity and y is a positive infinity, this function returns HUGE_VALL + 3*M_PI_4i. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALL + 0i. If x and y are both positive infinity, this function returns HUGE_VALL + M_PI_4i. If x is an infinity and y is NAN, this function returns HUGE_VALL + NANi. If x is NAN and y is not an infinity, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is NAN and y is a positive infinity, this function returns HUGE_VALL + NANi. If x and y are both NAN, this function returns NAN + NANi.
conj()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) conj (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the conjugate of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose conjugate is to be obtained. |
Returns:
Returns the conjugate of z, which is equal to x - yi.
conjf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) conjf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the conjugate of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose conjugate is to be obtained. |
Returns:
Returns the conjugate of z, which is equal to x - yi.
conjl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) conjl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the conjugate of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose conjugate is to be obtained. |
Returns:
Returns the conjugate of z, which is equal to x - yi.
copysign()
double copysign (double x, double y )
Description:
Generates a value by combining the magnitude of the double value x and the sign of the double value y.
For example, if x is 42.0 and y is -1.0, value -42.0 will be generated.
Parameters:
x | Indicates the double value x whose magnitude will be used. |
y | Indicates the double value y whose sign will be used. |
Returns:
Returns the generated value if the operation is successful; returns a NaN value with the sign of y if x is a NaN value.
copysignf()
float copysignf (float x, float y )
Description:
Generates a value by combining the magnitude of the float value x and the sign of the float value y.
For example, if x is 42.0 and y is -1.0, value -42.0 will be generated.
Parameters:
x | Indicates the float value x whose magnitude will be used. |
y | Indicates the float value y whose sign will be used. |
Returns:
Returns the generated value if the operation is successful; returns a NaN value with the sign of y if x is a NaN value.
copysignl()
long double copysignl (long double x, long double y )
Description:
Generates a value by combining the magnitude of the long double value x and the sign of the long double value y.
For example, if x is 42.0 and y is -1.0, value -42.0 will be generated.
Parameters:
x | Indicates the long double value x whose magnitude will be used. |
y | Indicates the long double value y whose magnitude will be used. |
Returns:
Returns the generated value if the operation is successful; returns a NaN value with the sign of y if x is a NaN value.
cos()
double cos (double x)
Description:
Calculates the cosine of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the cosine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
cosf()
float cosf (float x)
Description:
Calculates the cosine of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the cosine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
cosh()
double cosh (double x)
Description:
Calculates the hyperbolic cosine of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the hyperbolic cosine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns 1. If x is a positive or negative infinity, this function returns a positive infinity. If an overflow range error occurs, this function returns HUGE_VAL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
coshf()
float coshf (float x)
Description:
Calculates the hyperbolic cosine of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the hyperbolic cosine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns 1. If x is a positive or negative infinity, this function returns a positive infinity. If an overflow range error occurs, this function returns HUGE_VALF, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
coshl()
long double coshl (long double x)
Description:
Calculates the hyperbolic cosine of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the hyperbolic cosine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns 1. If x is a positive or negative infinity, this function returns a positive infinity. If an overflow range error occurs, this function returns HUGE_VALL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
cosl()
long double cosl (long double x)
Description:
Calculates the cosine of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the cosine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
cpow()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cpow (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) x, double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z )
Description:
Calculates the value of x raised to the z power.
The mathematical formula is x^z.
Parameters:
x | Indicates the base (a double complex number). |
z | Indicates the exponent (a double complex number). |
Attention:
If an error occurs or x or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula cexp(z*clog(x)).
Returns:
Returns the value of x raised to the z power if the operation is successful.
cpowf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cpowf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) x, float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z )
Description:
Calculates the value of x raised to the z power.
The mathematical formula is x^z.
Parameters:
x | Indicates the base (a float complex number). |
z | Indicates the exponent (a float complex number). |
Attention:
If an error occurs or x or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula cexp(z*clog(x)).
Returns:
Returns the value of x raised to the z power if the operation is successful.
cpowl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cpowl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) x, long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z )
Description:
Calculates the value of x raised to the z power.
The mathematical formula is x^z.
Parameters:
x | Indicates the base (a long double complex number). |
z | Indicates the exponent (a long double complex number). |
Attention:
If an error occurs or x or z is a positive or negative infinity or NAN, the returned value is calculated based on the formula cexp(z*clog(x)).
Returns:
Returns the value of x raised to the z power if the operation is successful.
cproj()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cproj (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the projection of the complex number z onto the Riemann sphere.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose projection onto the Riemann sphere is to be obtained. |
Returns:
Returns the projection of z onto the Riemann sphere if the operation is successful. If x is NAN and y is an infinity, this function returns HUGE_VAL. If x is an infinity, this function returns HUGE_VAL + i*copysign(0.0, cimag(z)).
cprojf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cprojf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the projection of the complex number z onto the Riemann sphere.
Parameters:
z | Indicates the complex number (a float value) whose projection onto the Riemann sphere is to be obtained. |
Returns:
Returns the projection of z onto the Riemann sphere if the operation is successful. If x is NAN and y is an infinity, this function returns HUGE_VALF. If x is an infinity, this function returns HUGE_VALF + i*copysign(0.0, cimag(z)).
cprojl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cprojl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the projection of the complex number z onto the Riemann sphere.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose projection onto the Riemann sphere is to be obtained. |
Returns:
Returns the projection of z onto the Riemann sphere if the operation is successful. If x is NAN and y is an infinity, this function returns HUGE_VALL. If x is an infinity, this function returns HUGE_VALL + i*copysign(0.0, cimag(z)).
creal()
double creal (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the real part of the complex number z.
Parameters:
z | Indicates the complex number (a double value) whose real part is to be obtained. |
Returns:
Returns the real part of z if the operation is successful.
crealf()
float crealf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the real part of the complex number z.
Parameters:
z | Indicates the complex number (a float value) whose real part is to be obtained. |
Returns:
Returns the real part of z if the operation is successful.
creall()
long double creall (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the real part of the complex number z.
Parameters:
z | Indicates the complex number (a long double value) whose real part is to be obtained. |
Returns:
Returns the real part of z if the operation is successful.
csin()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csin (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose sine is to be obtained. |
Returns:
Returns the sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is a positive infinity, this function returns NANi and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NANi. If x is a positive finite value and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive finite value and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VAL. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VAL*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
csinf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose sine is to be obtained. |
Returns:
Returns the sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is a positive infinity, this function returns NANi and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NANi. If x is a positive finite value and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive finite value and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VALF. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALF*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-) HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
csinh()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinh (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose hyperbolic sine is to be obtained. |
Returns:
Returns the hyperbolic sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is a positive infinity, this function returns NANi and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NANi. If x is a positive finite value and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive finite value and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VAL. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VAL*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-)HUGE_VAL + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
csinhf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinhf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose hyperbolic sine is to be obtained. |
Returns:
Returns the hyperbolic sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is a positive infinity, this function returns NANi and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NANi. If x is a positive finite value and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive finite value and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VALF. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALF*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-) HUGE_VALF + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
csinhl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinhl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose hyperbolic sine is to be obtained. |
Returns:
Returns the hyperbolic sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is a positive infinity, this function returns NANi and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NANi. If x is a positive finite value and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive finite value and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VALL. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALL*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
csinl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the sine of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose sine is to be obtained. |
Returns:
Returns the sine of z if the operation is successful. If x and y are both 0, this function returns 0. If x is 0 and y is a positive infinity, this function returns NANi and throws the FE_INVALID exception. If x is 0 and y is NAN, this function returns NANi. If x is a positive finite value and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive finite value and y is NAN, this function returns NAN + NANi and throws the FE_INVALID exception. If x is a positive infinity and y is 0, this function returns HUGE_VALL. If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALL*(cos(y) + isin(y)). If x and y are both positive infinity, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain) and throws the FE_INVALID exception. If x is a positive infinity and y is NAN, this function returns +(-)HUGE_VALL + NANi (the sign bit of the real part of the returned value is uncertain). If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
csqrt()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csqrt (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the square root of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose square root is to be obtained. |
Returns:
Returns the square root of z if the operation is successful. If x is +0 or -0 and y is +0, this function returns +0 + 0i. If x is neither an infinity nor NAN and y is a positive infinity, this function returns HUGE_VAL + HUGE_VALi. If x is a finite value or NAN and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VALi. If x is a negative infinity and y is NAN, this function returns NAN +(-) HUGE_VALi (the sign bit of the imaginary part of the returned value is uncertain). If x is a positive infinity and y is a positive finite value, this function returns HUGE_VAL + 0i. If x is a positive infinity and y is NAN, this function returns HUGE_VAL + NANi. If x is NAN and y is any value, this function returns NAN + NANi and may throw the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
csqrtf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csqrtf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the square root of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose square root is to be obtained. |
Returns:
Returns the square root of z if the operation is successful. If x is +0 or -0 and y is +0, this function returns +0 + 0i. If x is neither an infinity nor NAN and y is a positive infinity, this function returns HUGE_VALF + HUGE_VALFi. If x is a finite value or NAN and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VALFi. If x is a negative infinity and y is NAN, this function returns NAN +(-) HUGE_VALFi (the sign bit of the imaginary part of the returned value is uncertain). If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALF + 0i. If x is a positive infinity and y is NAN, this function returns HUGE_VALF + NANi. If x is NAN and y is any value, this function returns NAN + NANi and may throw the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
csqrtl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csqrtl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the square root of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose square root is to be obtained. |
Returns:
Returns the square root of z if the operation is successful. If x is +0 or -0 and y is +0, this function returns +0 + 0i. If x is neither an infinity nor NAN and y is a positive infinity, this function returns HUGE_VALL + HUGE_VALLi. If x is a finite value or NAN and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a negative infinity and y is a positive finite value, this function returns HUGE_VALLi. If x is a negative infinity and y is NAN, this function returns NAN +(-) HUGE_VALLi (the sign bit of the imaginary part of the returned value is uncertain). If x is a positive infinity and y is a positive finite value, this function returns HUGE_VALL + 0i. If x is a positive infinity and y is NAN, this function returns HUGE_VALL+NANi. If x is NAN and y is any value, this function returns NAN + NANi and may throw the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ctan()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctan (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose tangent is to be obtained. |
Returns:
Returns the tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns 1. If x and y are both positive infinity, this function returns 1. If x is a positive infinity and y is NAN, this function returns 1. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ctanf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose tangent is to be obtained. |
Returns:
Returns the tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns 1. If x and y are both positive infinity, this function returns 1. If x is a positive infinity and y is NAN, this function returns 1. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ctanh()
double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanh (double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a double value) whose hyperbolic tangent is to be obtained. |
Returns:
Returns the hyperbolic tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns 1. If x and y are both positive infinity, this function returns 1. If x is a positive infinity and y is NAN, this function returns 1. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ctanhf()
float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanhf (float [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a float value) whose hyperbolic tangent is to be obtained. |
Returns:
Returns the hyperbolic tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns 1. If x and y are both positive infinity, this function returns 1. If x is a positive infinity and y is NAN, this function returns 1. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ctanhl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanhl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the hyperbolic tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose hyperbolic tangent is to be obtained. |
Returns:
Returns the hyperbolic tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns 1. If x and y are both positive infinity, this function returns 1. If x is a positive infinity and y is NAN, this function returns 1. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
ctanl()
long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanl (long double [complex]($api-api-SmartVision-Devices-MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z)
Description:
Calculates the tangent of the complex number z.
z = x + yi, where i = sqrt(-1)
Parameters:
z | Indicates the complex number (a long double value) whose tangent is to be obtained. |
Returns:
Returns the tangent of z if the operation is successful. If x and y are both 0, this function returns 0. If x is not an infinity and y is a positive infinity, this function returns NAN + NANi and throws the FE_INVALID exception. If x is not an infinity and y is NAN, this function returns NAN + NANi and may throw the FE_INVALID exception. If x is a positive infinity and y is a positive finite value, this function returns 1. If x and y are both positive infinity, this function returns 1. If x is a positive infinity and y is NAN, this function returns 1. If x is NAN and y is 0, this function returns NAN. If x is NAN and y is not 0, this function returns NAN + NANi and throws the FE_INVALID exception. If x and y are both NAN, this function returns NAN + NANi.
erf()
double erf (double x)
Description:
Calculates the error function of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the error function if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns +1 or -1, respectively. If an underflow range error occurs, this function returns 2*x/sqrt(pi) and throws the FE_UNDERFLOW exception.
erfc()
double erfc (double x)
Description:
Calculates the complementary error function of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the complementary error function if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns 1. If x is a positive infinity, this function returns +0. If x is a negative infinity, this function returns +2. If an underflow range error occurs and an unrepresentable value is generated, this function returns 0.0. If an underflow range error occurs and a representable value is generated, this function returns 0 and throws the FE_UNDERFLOW exception.
erfcf()
float erfcf (float x)
Description:
Calculates the complementary error function of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the complementary error function if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns 1. If x is a positive infinity, this function returns +0. If x is a negative infinity, this function returns +2. If an underflow range error occurs and an unrepresentable value is generated, this function returns 0.0. If an underflow range error occurs and a representable value is generated, this function returns 0 and throws the FE_UNDERFLOW exception.
erfcl()
long double erfcl (long double x)
Description:
Calculates the complementary error function of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the complementary error function if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns 1. If x is a positive infinity, this function returns +0. If x is a negative infinity, this function returns +2. If an underflow range error occurs and an unrepresentable value is generated, this function returns 0.0. If an underflow range error occurs and a representable value is generated, this function returns 0 and throws the FE_UNDERFLOW exception.
erff()
float erff (float x)
Description:
Calculates the error function of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the error function if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns +1 or -1, respectively. If an underflow range error occurs, this function returns 2*x/sqrt(pi) and throws the FE_UNDERFLOW exception.
erfl()
long double erfl (long double x)
Description:
Calculates the error function of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the error function if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns +1 or -1, respectively. If an underflow range error occurs, this function returns 2*x/sqrt(pi) and throws the FE_UNDERFLOW exception.
exp()
double exp (double x)
Description:
Calculates the base-e exponential function of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the base-e exponential function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns +0. If an underflow range error occurs, this function returns 0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception. If an overflow range error occurs, this function returns +HUGE_VAL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
exp10()
double exp10 (double x)
Description:
Calculates the base-10 exponential function of the double value x.
Parameters:
x | Indicates the double value x used as the exponent. |
Returns:
Returns the base-10 exponential function of x if the operation is successful.
exp10f()
float exp10f (float x)
Description:
Calculates the base-10 exponential function of the float value x.
Parameters:
x | Indicates the float value x used as the exponent. |
Returns:
Returns the base-10 exponential function of x if the operation is successful.
exp10l()
long double exp10l (long double x)
Description:
Calculates the base-10 exponential function of the long double value x.
Parameters:
x | Indicates the long double value x used as the exponent. |
Returns:
Returns the base-10 exponential function of x if the operation is successful.
exp2()
double exp2 (double x)
Description:
Calculates the base-2 exponential function of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the base-2 exponential function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns +0. If an underflow range error occurs, this function returns 0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception. If an overflow range error occurs, this function returns +HUGE_VALL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
exp2f()
float exp2f (float x)
Description:
Calculates the base-2 exponential function of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the base-2 exponential function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns +0. If an underflow range error occurs, this function returns 0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception. If an overflow range error occurs, this function returns +HUGE_VALL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
exp2l()
long double exp2l (long double x)
Description:
Calculates the base-2 exponential function of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the base-2 exponential function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns +0. If an underflow range error occurs, this function returns 0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception. If an overflow range error occurs, this function returns +HUGE_VALL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
expf()
float expf (float x)
Description:
Calculates the base-e exponential function of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the base-e exponential function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns +0. If an underflow range error occurs, this function returns 0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception. If an overflow range error occurs, this function returns +HUGE_VALF, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
expl()
long double expl (long double x)
Description:
Calculates the base-e exponential function of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the base-e exponential function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns +0. If an underflow range error occurs, this function returns 0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception. If an overflow range error occurs, this function returns +HUGE_VALL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
expm1()
double expm1 (double x)
Description:
Calculates e raised to the power of the double value x minus one, that is, (e^x)-1.
Parameters:
x | Indicates the double value. |
Returns:
Returns e raised to the power of x minus one if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns -1. If an overflow range error occurs, this function returns +HUGE_VAL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
expm1f()
float expm1f (float x)
Description:
Calculates e raised to the power of the float value x minus one.
Parameters:
x | Indicates the float value. |
Returns:
Returns e raised to the power of x minus one if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns -1. If an overflow range error occurs, this function returns +HUGE_VALF, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
expm1l()
long double expm1l (long double x)
Description:
Calculates e raised to the power of the long double value x minus one.
Parameters:
x | Indicates the long double value. |
Returns:
Returns e raised to the power of x minus one if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive infinity, this function returns a positive infinity. If x is a negative infinity, this function returns -1. If an overflow range error occurs, this function returns +HUGE_VALL, sets errno to ERANGE, and throws the FE_OVERFLOW exception.
fabs()
double fabs (double x)
Description:
Calculates the absolute value of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the absolute value of x if the operation is successful; returns a NaN value if x is a NaN value; returns +0 if x is -0; returns a positive infinity if x is a positive or negative infinity.
fabsf()
float fabsf (float x)
Description:
Calculates the absolute value of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the absolute value of x if the operation is successful; returns a NaN value if x is a NaN value; returns +0 if x is -0; returns a positive infinity if x is a positive or negative infinity.
fabsl()
long double fabsl (long double x)
Description:
Calculates the absolute value of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the absolute value of x if the operation is successful; returns a NaN value if x is a NaN value; returns +0 if x is -0; returns a positive infinity if x is a positive or negative infinity.
fdim()
double fdim (double x, double y )
Description:
Calculates the positive difference between the double value x and y.
Parameters:
x | Indicates the double value x. |
y | Indicates the double value y. |
Returns:
Returns the positive difference between x and y.
fdimf()
float fdimf (float x, float y )
Description:
Calculates the positive difference between the float value x and y.
Parameters:
x | Indicates the float value x. |
y | Indicates the float value y. |
Returns:
Returns the positive difference between x and y.
fdiml()
long double fdiml (long double x, long double y )
Description:
Calculates the positive difference between the long double value x and y.
Parameters:
x | Indicates the long double value x. |
y | Indicates the long double value y. |
Returns:
Returns the positive difference between x and y.
feclearexcept()
int feclearexcept (int excepts)
Description:
Clears floating-point exceptions specified by excepts.
Parameters:
excepts | Indicates the floating-point exceptions to clear. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
fegetenv()
int fegetenv ([fenv_t]($api-api-SmartVision-Devices-fenv_t.md) * envp)
Description:
Stores the current floating-point environment into the object specified by envp.
The floating-point environment contains the current control modes and status flags of floating-point operations.
Parameters:
envp | Indicates the pointer to the floating-point environment. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
fegetexceptflag()
int fegetexceptflag ([fexcept_t]($api-api-SmartVision-Devices-MATH.md#ga3eec78fdb9921de3f7254105f546c624) * flagp, int excepts )
Description:
Stores the floating-point exceptions specified by excepts into the flagp variable address.
Parameters:
flagp | Indicates the pointer to the floating-point exceptions. |
excepts | Indicates the current floating-point exceptions to store. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
fegetround()
int fegetround (void )
Description:
Obtains the macro corresponding to the current rounding mode.
The rounding mode can be FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, or FE_TOWARDZERO.
Returns:
Returns the macro corresponding to the current rounding mode.
feholdexcept()
int feholdexcept ([fenv_t]($api-api-SmartVision-Devices-fenv_t.md) * envp)
Description:
Stores the current floating-point environment into the object specified by envp, with all status flags cleared.
Parameters:
envp | Indicates the pointer to the floating-point environment. |
Attention:
This function clears all exception status flags and sets the environment to the non-stop mode (to continue the execution of the exceptions), if any.
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
feraiseexcept()
int feraiseexcept (int excepts)
Description:
Obtains the floating-point exceptions specified by excepts.
Parameters:
excepts | Indicates the floating-point exceptions to obtain. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
fesetenv()
int fesetenv (const [fenv_t]($api-api-SmartVision-Devices-fenv_t.md) * envp)
Description:
Sets the current floating-point environment.
This function restores the floating-point environment from the object specified by envp. The floating-point environment contains the current control modes and status flags of floating-point operations.
Parameters:
envp | Indicates the pointer to the floating-point environment. |
Attention:
The object specified by envp must be valid.
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
fesetexceptflag()
int fesetexceptflag (const [fexcept_t]($api-api-SmartVision-Devices-MATH.md#ga3eec78fdb9921de3f7254105f546c624) * flagp, int excepts )
Description:
Sets the exception status flag by copying the floating-point exceptions stored in the flagp address to the excepts parameter.
Parameters:
flagp | Indicates the pointer to the floating-point exceptions. |
excepts | Indicates the current floating-point exceptions to store. |
Attention:
Before using this function, ensure that you have successfully called fegetexceptflag.
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
fesetround()
int fesetround (int rounding_mode)
Description:
Sets the rounding mode.
The rounding mode can be FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, or FE_TOWARDZERO.
Parameters:
rounding_mode | Indicates the rounding mode to set. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
fetestexcept()
int fetestexcept (int excepts)
Description:
Checks whether the floating-point exceptions specified by excepts have been raised.
For example, if the value of excepts is FE_OVERFLOW | FE_INVALID, this function checks whether the current floating-point operation has thrown an overflow exception or is invalid.
Parameters:
excepts | Indicates the floating-point exceptions. |
Returns:
Returns the macros describing the specified exceptions if they have been raised; returns 0 if the specified exceptions do not exist.
feupdateenv()
int feupdateenv (const [fenv_t]($api-api-SmartVision-Devices-fenv_t.md) * envp)
Description:
Updates the current floating-point environment from the object specified by envp.
Parameters:
envp | Indicates the pointer to the floating-point environment. |
Attention:
The object specified by envp must be valid.
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
finite()
int finite (double x)
Description:
Checks whether the double value x is an infinity or a NaN value.
Parameters:
x | Indicates the double value to check. |
Returns:
Returns 0 if x is an infinity or a NaN value; returns 1 otherwise.
finitef()
int finitef (float x)
Description:
Checks whether the float value x is an infinity or a NaN value.
Parameters:
x | Indicates the float value to check. |
Returns:
Returns 0 if x is an infinity or a NaN value; returns 1 otherwise.
floor()
double floor (double x)
Description:
Obtains the largest integer less than or equal to the double value x.
Parameters:
x | Indicates the double value x to compare with. |
Returns:
Returns the largest integer less than or equal to x.
floorf()
float floorf (float x)
Description:
Obtains the largest integer less than or equal to the float value x.
Parameters:
x | Indicates the float value x to compare with. |
Returns:
Returns the largest integer less than or equal to x.
floorl()
long double floorl (long double x)
Description:
Obtains the largest integer less than or equal to the long double value x.
Parameters:
x | Indicates the long double value x to compare with. |
Returns:
Returns the largest integer less than or equal to x.
fma()
double fma (double x, double y, double z )
Description:
Calculates the value of x*y+z and rounds the result up.
Parameters:
x | Indicates the double value x. |
y | Indicates the double value y. |
z | Indicates the double value z. |
Attention:
The rounding mode is the same as that set in the system.
Returns:
Returns the calculation result.
fmaf()
float fmaf (float x, float y, float z )
Description:
Calculates the value of x*y+z and rounds the result up.
Parameters:
x | Indicates the float value x. |
y | Indicates the float value y. |
z | Indicates the float value z. |
Attention:
The rounding mode is the same as that set in the system.
Returns:
Returns the calculation result.
fmal()
long double fmal (long double x, long double y, long double z )
Description:
Calculates the value of x*y+z and rounds the result up.
Parameters:
x | Indicates the long double value x. |
y | Indicates the long double value y. |
z | Indicates the long double value z. |
Attention:
The rounding mode is the same as that set in the system.
Returns:
Returns the calculation result.
fmax()
double fmax (double x, double y )
Description:
Obtains the larger value of two double values x and y.
Parameters:
x | Indicates the double value x. |
y | Indicates the double value y. |
Returns:
Returns the larger value.
fmaxf()
float fmaxf (float x, float y )
Description:
Obtains the larger value of two float values x and y.
Parameters:
x | Indicates the float value x. |
y | Indicates the float value y. |
Returns:
Returns the larger value.
fmaxl()
long double fmaxl (long double x, long double y )
Description:
Obtains the larger value of two long double values x and y.
Parameters:
x | Indicates the long double value x. |
y | Indicates the long double value y. |
Returns:
Returns the larger value.
fmin()
double fmin (double x, double y )
Description:
Obtains the smaller value of two double values x and y.
Parameters:
x | Indicates the double value x. |
y | Indicates the double value y. |
Returns:
Returns the smaller value.
fminf()
float fminf (float x, float y )
Description:
Obtains the smaller value of two float values x and y.
Parameters:
x | Indicates the float value x. |
y | Indicates the float value y. |
Returns:
Returns the smaller value.
fminl()
long double fminl (long double x, long double y )
Description:
Obtains the smaller value of two long double values x and y.
Parameters:
x | Indicates the long double value x. |
y | Indicates the long double value y. |
Returns:
Returns the smaller value.
fmod()
double fmod (double x, double y )
Description:
Calculates the remainder of the double value x divided by the double value y.
Parameters:
x | Indicates the double value x, which is used as the numerator. |
y | Indicates the double value y, which is used as the denominator. |
Returns:
Returns the remainder.
fmodf()
float fmodf (float x, float y )
Description:
Calculates the remainder of the float value x divided by the float value y.
Parameters:
x | Indicates the float value x, which is used as the numerator. |
y | Indicates the float value y, which is used as the denominator. |
Returns:
Returns the remainder.
fmodl()
long double fmodl (long double x, long double y )
Description:
Calculates the remainder of the long double value x divided by the long double value y.
Parameters:
x | Indicates the long double value x, which is used as the numerator. |
y | Indicates the long double value y, which is used as the denominator. |
Returns:
Returns the remainder.
frexp()
double frexp (double x, int * exp )
Description:
Decomposes the double value x into a significand and an integral exponent for 2.
The absolute value of the significand ranges from 0.5 (included) to 1 (excluded). x = significand * 2^exponent
Parameters:
x | Indicates the double value x to decompose. |
exp | Indicates the pointer to the exponent. |
Returns:
Returns the binary significand of x if the operation is successful; returns 0 if x is 0 (exp is also 0); returns a NaN value if x is a NaN value (exp is not specified); returns a positive or negative infinity if x is a positive or negative infinity, respectively (exp is not specified).
frexpf()
float frexpf (float x, int * exp )
Description:
Decomposes float value x into a binary significand and an integral exponent for 2.
The absolute value of the significand ranges from 0.5 (included) to 1 (excluded). x = significand * 2^exponent
Parameters:
x | Indicates the float value to decompose. |
exp | Indicates the pointer to an integer where the exponent is stored. |
Returns:
Returns the binary significand of x if the operation is successful; returns 0 if x is 0 (exp is also 0); returns a NaN value if x is a NaN value (exp is not specified); returns a positive or negative infinity if x is a positive or negative infinity (exp is not specified).
frexpl()
long double frexpl (long double x, int * exp )
Description:
Decomposes long double value x into a binary significand and an integral exponent for 2.
The absolute value of the significand ranges from 0.5 (included) to 1 (excluded). x = significand * 2^exponent
Parameters:
x | Indicates the long double value to decompose. |
exp | Indicates the pointer to an integer where the exponent is stored. |
Returns:
Returns the binary significand of x if the operation is successful; returns 0 if x is 0 (exp is also 0); returns a NaN value if x is a NaN value (exp is not specified); returns a positive or negative infinity if x is a positive or negative infinity (exp is not specified).
hypot()
double hypot (double x, double y )
Description:
Calculates the hypotenuse of a right triangle whose legs are x and y.
Parameters:
x | Indicates the length of one side of the right triangle, represented using a double value. |
y | Indicates the length of the other side of the right triangle, represented using a double value. |
Returns:
Returns the hypotenuse of the right triangle.
hypotf()
float hypotf (float x, float y )
Description:
Calculates the hypotenuse of a right triangle whose legs are x and y.
Parameters:
x | Indicates the length of one side of the right triangle, represented using a float value. |
y | Indicates the length of the other side of the right triangle, represented using a float value. |
Returns:
Returns the hypotenuse of the right triangle.
hypotl()
long double hypotl (long double x, long double y )
Description:
Calculates the hypotenuse of a right triangle whose legs are x and y.
Parameters:
x | Indicates the length of one side of the right triangle, represented using a long double value. |
y | Indicates the length of the other side of the right triangle, represented using a long double value. |
Returns:
Returns the hypotenuse of the right triangle.
ilogb()
int ilogb (double x)
Description:
Obtains the integral part of the logarithm of double value x.
FLT_RADIX is used as the base for the logarithm.
Parameters:
x | Indicates the double value. |
Returns:
Returns the integral part of the logarithm of x if the operation is successful. If x is 0, this function returns FP_ILOGB0 and reports a domain error. If x is a NaN value, this function returns FP_ILOGBNAN and reports a domain error. If x is positive or negative infinity, this function returns INT_MAX and reports a domain error.
ilogbf()
int ilogbf (float x)
Description:
Obtains the integral part of the logarithm of float value x.
FLT_RADIX is used as the base for the logarithm.
Parameters:
x | Indicates the float value. |
Returns:
Returns the integral part of the logarithm of x if the operation is successful. If x is 0, this function returns FP_ILOGB0 and reports a domain error. If x is a NaN value, this function returns FP_ILOGBNAN and reports a domain error. If x is positive or negative infinity, this function returns INT_MAX and reports a domain error.
ilogbl()
int ilogbl (long double x)
Description:
Obtains the integral part of the logarithm of the long double value x.
FLT_RADIX is used as the base for the logarithm.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the integral part of the logarithm of x if the operation is successful. If x is 0, this function returns FP_ILOGB0 and reports a domain error. If x is a NaN value, this function returns FP_ILOGBNAN and reports a domain error. If x is positive or negative infinity, this function returns INT_MAX and reports a domain error.
j0()
double j0 (double x)
Description:
Calculates the Bessel function of the first kind of order 0 for the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the Bessel function of the first kind of order 0 for x if the operation is successful; returns a NaN value if x is a NaN value; returns 0 and sets errno to ERANGE if x is too large or an overflow range error occurs.
j0f()
float j0f (float x)
Description:
Calculates the Bessel function of the first kind of order 0 for the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the calculation result if the operation is successful; returns a NaN value if x is a NaN value; returns 0 and sets errno to ERANGE if x is too large or an overflow range error occurs.
j1()
double j1 (double x)
Description:
Calculates the Bessel function of the first kind of order 1 for the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the Bessel function of the first kind of order 1 for x if the operation is successful; returns a NaN value if x is a NaN value; returns 0 and sets errno to ERANGE if x is too large or an overflow range error occurs.
j1f()
float j1f (float x)
Description:
Calculates the Bessel function of the first kind of order 1 for the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the calculation result if the operation is successful; returns a NaN value if x is a NaN value; returns 0 and sets errno to ERANGE if x is too large or an overflow range error occurs.
jn()
double jn (int n, double x )
Description:
Calculates the Bessel function of the first kind of order n for the double value x.
Parameters:
n | Indicates the order of the Bessel function of the first kind. |
x | Indicates the double value. |
Returns:
Returns the Bessel function of the first kind of order n for x if the operation is successful; returns a NaN value if x is a NaN value; returns 0 and sets errno to ERANGE if x is too large or an overflow range error occurs.
jnf()
float jnf (int n, float x )
Description:
Calculates the Bessel function of the first kind of order n for the float value x.
Parameters:
n | Indicates the order of the Bessel function of the first kind. |
x | Indicates the float value. |
Returns:
Returns the calculation result if the operation is successful; returns a NaN value if x is a NaN value; returns 0 and sets errno to ERANGE if x is too large or an overflow range error occurs.
ldexp()
double ldexp (double x, int exp )
Description:
Multiplies the double value x by 2 raised to the power of exp.
The calculation formula is x*2^exp.
Parameters:
x | Indicates the double value. |
exp | Indicates the exponent. |
Returns:
Returns the calculation result.
ldexpf()
float ldexpf (float x, int exp )
Description:
Multiplies the float value x by 2 raised to the power of exp.
The calculation formula is x*2^exp.
Parameters:
x | Indicates the float value. |
exp | Indicates the exponent. |
Returns:
Returns the calculation result.
ldexpl()
long double ldexpl (long double x, int exp )
Description:
Multiplies the long double value x by 2 raised to the power of exp.
The calculation formula is x*2^exp.
Parameters:
x | Indicates the long double value. |
exp | Indicates the exponent. |
Returns:
Returns the calculation result.
lgamma()
double lgamma (double x)
Description:
Calculates the natural logarithm of the absolute value of the gamma function of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the calculation result if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 1 or 2, this function returns +0. If x is a positive or negative infinity, this function returns a positive infinity. If x is 0 or a negative value, this function returns one of +HUGE_VAL, reports a pole error, and sets errno to ERANGE). If an overflow range error occurs, this function returns one of HUGE_VAL * and sets errno to ERANGE.
lgammaf()
float lgammaf (float x)
Description:
Calculates the natural logarithm of the absolute value of the gamma function of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the calculation result if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 1 or 2, this function returns +0. If x is a positive or negative infinity, this function returns a positive infinity. If x is 0 or a negative value, this function returns one of +HUGE_VALF, reports a pole error, and sets errno to ERANGE. If an overflow range error occurs, this function returns one of HUGE_VALF and sets errno to ERANGE.
lgammal()
long double lgammal (long double x)
Description:
Calculates the natural logarithm of the absolute value of the gamma function of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the calculation result if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 1 or 2, this function returns +0. If x is a positive or negative infinity, this function returns a positive infinity. If x is 0 or a negative value, this function returns one of +HUGE_VALL, reports a pole error, and sets errno to ERANGE. If an overflow range error occurs, this function returns one of HUGE_VALL and sets errno to ERANGE.
lgammal_r()
long double lgammal_r (long double x, int * signp )
Description:
Calculates the natural logarithm of the absolute value of the gamma function of the double value x.
Parameters:
x | Indicates the double value. |
signp | return value of sign. |
Returns:
Returns the calculation result if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 1 or 2, this function returns +0. If x is a positive or negative infinity, this function returns a positive infinity. If x is 0 or a negative value, this function returns one of +HUGE_VAL, reports a pole error, and sets errno to ERANGE). If an overflow range error occurs, this function returns one of HUGE_VAL * and sets errno to ERANGE.
llrint()
long long int llrint (double x)
Description:
Rounds double value x to the nearest integer.
Parameters:
x | Indicates the double value to round. |
Attention:
The type of x, rounding mode, and rounding direction are specified by fegetround.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
llrintf()
long long int llrintf (float x)
Description:
Rounds float value x to the nearest integer.
Parameters:
x | Indicates the float value. |
Attention:
The type of x, rounding mode, and rounding direction are specified by fegetround.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
llrintl()
long long int llrintl (long double x)
Description:
Rounds long double value x to the nearest integer.
Parameters:
x | Indicates the long double value. |
Attention:
The type of x, rounding mode, and rounding direction are specified by fegetround.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
llround()
long long int llround (double x)
Description:
Rounds double value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the double value. |
Attention:
Halfway values are rounded away from 0.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
llroundf()
long long int llroundf (float x)
Description:
Rounds float value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the float value. |
Attention:
Halfway values are rounded away from 0.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
llroundl()
long long int llroundl (long double x)
Description:
Rounds long double value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the long double value. |
Attention:
Halfway values are rounded away from 0.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
log()
double log (double x)
Description:
Calculates the natural logarithm of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the natural logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VAL, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log10()
double log10 (double x)
Description:
Calculates the common logarithm (logarithm with base 10) of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the natural logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VAL, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log10f()
float log10f (float x)
Description:
Calculates the common logarithm (logarithm with base 10) of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the natural logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VALF, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log10l()
long double log10l (long double x)
Description:
Calculates the common logarithm (logarithm with base 10) of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the natural logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VALL, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log1p()
double log1p (double x)
Description:
Calculates the natural logarithm of one plus the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the natural logarithm of one plus x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is -1, this function returns -HUGE_VAL, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is less than -1 (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log1pf()
float log1pf (float x)
Description:
Calculates the natural logarithm of one plus the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the natural logarithm of one plus x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is -1, this function returns -HUGE_VALF, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is less than -1 (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log1pl()
long double log1pl (long double x)
Description:
Calculates the natural logarithm of one plus the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the natural logarithm of one plus x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is -1, this function returns -HUGE_VALL, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is less than -1 (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log2()
double log2 (double x)
Description:
Calculates the binary logarithm (logarithm with base 2) of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the binary logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VAL, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log2f()
float log2f (float x)
Description:
Calculates the binary logarithm (logarithm with base 2) of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the binary logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VALF, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
log2l()
long double log2l (long double x)
Description:
Calculates the binary logarithm (logarithm with base 2) of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the binary (base-2) logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VALL, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
logb()
double logb (double x)
Description:
Calculates the logarithm of the absolute value of the double value x.
FLT_RADIX is used as the base for the logarithm.
Parameters:
x | Indicates the double value. |
Attention:
Set FLT_RADIX to 2 in the float.h file.
Returns:
Returns the logarithm of the absolute value of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a positive or negative infinity. If x is 0, this function returns -HUGE_VAL, reports a pole error, and throws the FE_DIVBYZERO exception.
logbf()
float logbf (float x)
Description:
Calculates the logarithm of the absolute value of the float value x.
FLT_RADIX is used as the base for the logarithm.
Parameters:
x | Indicates the float value. |
Attention:
Set FLT_RADIX to 2 in the float.h file.
Returns:
Returns the logarithm of the absolute value of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a positive or negative infinity. If x is 0, this function returns -HUGE_VALF, reports a pole error, and throws the FE_DIVBYZERO exception.
logbl()
long double logbl (long double x)
Description:
Calculates the logarithm of the absolute value of the long double value x.
FLT_RADIX is used as the base for the logarithm.
Parameters:
x | Indicates the long double value. |
Attention:
Set FLT_RADIX to 2 in the float.h file.
Returns:
Returns the logarithm of the absolute value of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a positive or negative infinity. If x is 0, this function returns -HUGE_VALL, reports a pole error, and throws the FE_DIVBYZERO exception.
logf()
float logf (float x)
Description:
Calculates the natural logarithm of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the natural logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VALF, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
logl()
long double logl (long double x)
Description:
Calculates the natural logarithm of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the natural logarithm of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is 0, this function returns -HUGE_VALL, reports a pole error, sets errno to ERANGE, and throws the FE_INVALID exception. If x is a negative value (including a negative infinity), this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_DIVBYZERO exception.
lrint()
long int lrint (double x)
Description:
Rounds the double value x to the nearest integer.
Parameters:
x | Indicates the double value to round. |
Attention:
The type of x, rounding mode, and rounding direction are specified by fegetround.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
lrintf()
long int lrintf (float x)
Description:
Rounds the float value x to the nearest integer.
Parameters:
x | Indicates the float value to round. |
Attention:
The type of x, rounding mode, and rounding direction are specified by fegetround.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
lrintl()
long int lrintl (long double x)
Description:
Rounds the long double value x to the nearest integer.
Parameters:
x | Indicates the long double value. |
Attention:
The type of x, rounding mode, and rounding direction are specified by fegetround.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
lround()
long int lround (double x)
Description:
Rounds double value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the double value to round. |
Attention:
Halfway values are rounded away from 0.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
lroundf()
long int lroundf (float x)
Description:
Rounds the float value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the float value to round. |
Attention:
Halfway values are rounded away from 0.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
lroundl()
long int lroundl (long double x)
Description:
Rounds the long double value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the long double value to round. |
Attention:
Halfway values are rounded away from 0.
Returns:
Returns the nearest integer if the operation is successful; returns an unspecified value if x is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs.
modf()
double modf (double x, double * iptr )
Description:
Breaks the double value x into a signed integral and a fractional part.
Parameters:
x | Indicates the double value x. |
iptr | Indicates the pointer to the object where the signed integral part is stored. |
Returns:
Returns the fractional part of x.
modff()
float modff (float x, float * iptr )
Description:
Breaks the float value x into a signed integral and a fractional part.
Parameters:
x | Indicates the float value x. |
iptr | Indicates the pointer to the object where the signed integral part is stored. |
Returns:
Returns the fractional part of x.
modfl()
long double modfl (long double x, long double * iptr )
Description:
Breaks the long double value x into a signed integral and a fractional part.
Parameters:
x | Indicates the long double value x. |
iptr | Indicates the pointer to the object where the signed integral part is stored. |
Returns:
Returns the fractional part of x.
nan()
double nan (const char * tagp)
Description:
Obtains a quiet NaN value of the double type.
This function checks whether the input parameter is a NaN value and converts it to the double type.
Parameters:
tagp | Indicates the pointer to a character constant. |
Returns:
Returns a quiet NaN value if the operation is successful; returns a NaN value otherwise.
nanf()
float nanf (const char * tagp)
Description:
Obtains a quiet NaN value of the float type.
This function checks whether the input parameter is a NaN value and converts it to the float type.
Parameters:
tagp | Indicates the pointer to a character constant. |
Returns:
Returns a quiet NaN value if the operation is successful; returns a NaN value otherwise.
nanl()
long double nanl (const char * tagp)
Description:
Obtains a quiet NaN value of the long double type.
This function checks whether the input parameter is a NaN value and converts it to the long double type.
Parameters:
tagp | Indicates the pointer to a character constant. |
Returns:
Returns a quiet NaN value if the operation is successful; returns a NaN value otherwise.
nearbyint()
double nearbyint (double x)
Description:
Rounds the double value x to an integer in floating-point format.
Parameters:
x | Indicates the double value x. |
Attention:
The rounding mode is specified by fegetround.
Returns:
Returns the rounded value.
nearbyintf()
float nearbyintf (float x)
Description:
Rounds the float value x to an integer in floating-point format.
Parameters:
x | Indicates the float value x. |
Attention:
The rounding mode is specified by fegetround.
Returns:
Returns the rounded value.
nearbyintl()
long double nearbyintl (long double x)
Description:
Rounds the long double value x to an integer in floating-point format.
Parameters:
x | Indicates the long double value. |
Attention:
The rounding mode is specified by fegetround.
Returns:
Returns the rounded value.
nextafter()
double nextafter (double x, double y )
Description:
Obtains the next representable value following the double value x in the direction of the double value y.
Parameters:
x | Indicates the double value x. |
y | Indicates the double value y. |
Attention:
If y is less than x, this function returns the maximum representable value less than x.
Returns:
Returns the next representable value after x in the direction of y if the operation is successful; returns the passed y if x is equal to y; returns a NaN value if x is a NaN value; returns HUGE_VAL and reports an overflow range error if x is a finite value.
nextafterf()
float nextafterf (float x, float y )
Description:
Obtains the next representable value following the float value x in the direction of the float value y.
Parameters:
x | Indicates the float value x. |
y | Indicates the float value y. |
Attention:
If y is less than x, this function returns the maximum representable value less than x.
Returns:
Returns the next representable value following x in the direction of y if the operation is successful; returns the passed y if x is equal to y; returns a NaN value if x is a NaN value; returns HUGE_VALF and reports an overflow range error if x is a finite value.
nextafterl()
long double nextafterl (long double x, long double y )
Description:
Obtains the next representable value following the long double value x in the direction of the long double value y.
Parameters:
x | Indicates the long double value x. |
y | Indicates the long double value y. |
Attention:
If y is less than x, this function returns the maximum representable value less than x.
Returns:
Returns the next representable value after x in the direction of y if the operation is successful; returns the passed y if x is equal to y; returns a NaN value if x is a NaN value; returns HUGE_VALL and reports an overflow range error if x is a finite value.
nexttoward()
double nexttoward (double x, long double y )
Description:
Obtains the next representable value following the double value x in the direction of the long double value y.
Parameters:
x | Indicates the double value x. |
y | Indicates the long double value y. |
Attention:
If y is less than x, this function returns the maximum representable value less than x.
Returns:
Returns the next representable value following x in the direction of y if the operation is successful; returns the passed y if x is equal to y; returns a NaN value if x is a NaN value; returns HUGE_VAL and reports an overflow range error if x is a finite value.
nexttowardf()
float nexttowardf (float x, long double y )
Description:
Obtains the next representable value following the float value x in the direction of the long double value y.
Parameters:
x | Indicates the float value x. |
y | Indicates the long double value y. |
Attention:
If y is less than x, this function returns the maximum representable value less than x.
Returns:
Returns the next representable value after x in the direction of y if the operation is successful; returns the passed y if x is equal to y; returns a NaN value if x is a NaN value; returns HUGE_VALF and reports an overflow range error if x is a finite value.
nexttowardl()
long double nexttowardl (long double x, long double y )
Description:
Obtains the next representable value following the long double value x in the direction of the long double value y.
Parameters:
x | Indicates the long double value x. |
y | Indicates the long double value y. |
Attention:
If y is less than x, this function returns the maximum representable value less than x.
Returns:
Returns the next representable value following x in the direction of y if the operation is successful; returns the passed y if x is equal to y; returns a NaN value if x is a NaN value; returns HUGE_VALL and reports an overflow range error if x is a finite value.
pow()
double pow (double x, double y )
Description:
Obtains the double value x raised to the power of the double value y.
Parameters:
x | Indicates the double value x, which is used as the base. |
y | Indicates the double value y, which is used as the exponent. |
Returns:
Returns the calculation result if the operation is successful. If x or y is a NaN value, this returns a NaN value, except as specified below. If x is +1 (even if y is a NaN value), this function returns 1.0. If y is 0 (even if x is a NaN value), this function returns 1.0. If x is +0 or -0, and y is an odd integer greater than 0, this function returns +0 or -0. If x is 0 and y is greater than 0 and not an odd integer, this function returns +0. If x is -1 and y is a positive or negative infinity, this function returns 1.0. If the absolute value of x is less than 1 and y is a negative infinity, this function returns a positive infinity. If the absolute value of x is greater than 1 and y is a negative infinity, this function returns +0. If the absolute value of x is less than 1 and y is a positive infinity, this function returns +0. If the absolute value of x is greater than 1 and y is a positive infinity, this function returns a positive infinity. If x is a negative infinity and y is an odd integer less than 0, this function returns -0. If x is a negative infinity and y is less than 0 and not an odd integer, this function returns +0. If x is a negative infinity and y is an odd integer greater than 0, this function returns a negative infinity. If x is a negative infinity and y is greater than 0 and not an odd integer, this function returns a positive infinity. If x is a positive infinity and y is less than 0, this function returns +0. If x is a positive infinity and y is greater than 0, this function returns a positive infinity. If x is a negative value and y is a finite non-integer, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception. If x is +0 or -0 and y is a negative odd integer, this function returns HUGE_VAL, reports a pole error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception. If x is +0 or -0 and y is a negative non-odd integer, this function returns +HUGE_VAL, reports a pole error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception. If an overflow range error occurs, this function returns HUGE_VAL, sets errno to ERANGE, and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0.0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception.
pow10()
double pow10 (double x)
Description:
Calculates the value of 10 raised to the power x, which is a double value.
Parameters:
x | Indicates the double value x. |
Returns:
Returns the value of 10 raised to the power x if the operation is successful.
pow10f()
float pow10f (float x)
Description:
Calculates the value of 10 raised to the power x, which is a float value.
Parameters:
x | Indicates the float value x. |
Returns:
Returns the value of 10 raised to the power x if the operation is successful.
pow10l()
long double pow10l (long double x)
Description:
Calculates the value of 10 raised to the power x, which is a long double value.
Parameters:
x | Indicates the long double value x. |
Returns:
Returns the value of 10 raised to the power x if the operation is successful.
powf()
float powf (float x, float y )
Description:
Obtains the float value x raised to the power of the float value y.
Parameters:
x | Indicates the float value x, which is used as the base. |
y | Indicates the float value y, which is used as the exponent. |
Returns:
Returns the calculation result if the operation is successful. If x or y is a NaN value, this returns a NaN value, except as specified below. If x is +1 (even if y is a NaN value), this function returns 1.0. If y is 0 (even if x is a NaN value), this function returns 1.0. If x is +0 or -0, and y is an odd integer greater than 0, this function returns +0 or -0. If x is 0 and y is greater than 0 and not an odd integer, this function returns +0. If x is -1 and y is a positive or negative infinity, this function returns 1.0. If the absolute value of x is less than 1 and y is a negative infinity, this function returns a positive infinity. If the absolute value of x is greater than 1 and y is a negative infinity, this function returns +0. If the absolute value of x is less than 1 and y is a positive infinity, this function returns +0. If the absolute value of x is greater than 1 and y is a positive infinity, this function returns a positive infinity. If x is a negative infinity and y is an odd integer less than 0, this function returns -0. If x is a negative infinity and y is less than 0 and not an odd integer, this function returns +0. If x is a negative infinity and y is an odd integer greater than 0, this function returns a negative infinity. If x is a negative infinity and y is greater than 0 and not an odd integer, this function returns a positive infinity. If x is a positive infinity and y is less than 0, this function returns +0. If x is a positive infinity and y is greater than 0, this function returns a positive infinity. If x is a negative value and y is a finite non-integer, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception. If x is +0 or -0 and y is a negative odd integer, this function returns HUGE_VALF, reports a pole error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception. If x is +0 or -0 and y is a negative non-odd integer, this function returns +HUGE_VALF, reports a pole error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception. If an overflow range error occurs, this function returns HUGE_VALF, sets errno to ERANGE, and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0.0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception.
powf10()
float powf10 (float x)
Description:
Calculates the xth power of 10.
Parameters:
x | Indicates the float value x, which is used as the exponent. |
Returns:
Returns the calculation result if the operation is successful. If y is 0 (even if x is a NaN value), this function returns 1.0. If an overflow range error occurs, this function returns HUGE_VALF, sets errno to ERANGE, and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0.0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception.
powl()
long double powl (long double x, long double y )
Description:
Obtains the long double value x raised to the power of the long double value y.
Parameters:
x | Indicates the long double value x, which is used as the base. |
y | Indicates the long double value y, which is used as the exponent. |
Returns:
Returns the calculation result if the operation is successful. If x or y is a NaN value, this returns a NaN value, except as specified below. If x is +1 (even if y is a NaN value), this function returns 1.0. If y is 0 (even if x is a NaN value), this function returns 1.0. If x is +0 or -0, and y is an odd integer greater than 0, this function returns +0 or -0. If x is 0 and y is greater than 0 and not an odd integer, this function returns +0. If x is -1 and y is a positive or negative infinity, this function returns 1.0. If the absolute value of x is less than 1 and y is a negative infinity, this function returns a positive infinity. If the absolute value of x is greater than 1 and y is a negative infinity, this function returns +0. If the absolute value of x is less than 1 and y is a positive infinity, this function returns +0. If the absolute value of x is greater than 1 and y is a positive infinity, this function returns a positive infinity. If x is a negative infinity and y is an odd integer less than 0, this function returns -0. If x is a negative infinity and y is less than 0 and not an odd integer, this function returns +0. If x is a negative infinity and y is an odd integer greater than 0, this function returns a negative infinity. If x is a negative infinity and y is greater than 0 and not an odd integer, this function returns a positive infinity. If x is a positive infinity and y is less than 0, this function returns +0. If x is a positive infinity and y is greater than 0, this function returns a positive infinity. If x is a negative value and y is a finite non-integer, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception. If x is +0 or -0 and y is a negative odd integer, this function returns HUGE_VALL, reports a pole error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception. If x is +0 or -0 and y is a negative non-odd integer, this function returns +HUGE_VALL, reports a pole error, sets errno to ERANGE, and throws the FE_DIVBYZERO exception. If an overflow range error occurs, this function returns HUGE_VALL, sets errno to ERANGE, and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0.0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception.
powl10()
long double powl10 (long double x)
Description:
Calculates the xth power of 10.
Parameters:
x | Indicates the long double value x, which is used as the exponent. |
Returns:
Returns the calculation result if the operation is successful. If x is 0, this function returns 1.0. If an overflow range error occurs, this function returns HUGE_VALL, sets errno to ERANGE, and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0.0, sets errno to ERANGE, and throws the FE_UNDERFLOW exception.
remainder()
double remainder (double x, double y )
Description:
Calculates the remainder of the double value x divided by the double value y.
Parameters:
x | Indicates the double value x, which is used as the numerator. |
y | Indicates the double value y, which is used as the denominator. |
Attention:
The return value is x-n*y, where n is the value of x/y, rounded toward the nearest integer (with halfway values rounded toward the even number). For example, if the decimal part of x/y is 0.5, the value is rounded to an even number and 0 is returned.
Returns:
Returns the remainder if the operation is successful. If x or y is a NaN value, this function returns a NaN value. If x is an infinity and y is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception. If y is 0 and x is not a NaN value, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVAID exception.
remainderf()
float remainderf (float x, float y )
Description:
Calculates the remainder of the float value x divided by the float value y.
Parameters:
x | Indicates the float value x, which is used as the numerator. |
y | Indicates the float value y, which is used as the denominator. |
Attention:
The return value is x-n*y, where n is the value of x/y, rounded toward the nearest integer (with halfway values rounded toward the even number). For example, if the decimal part of x/y is 0.5, the value is rounded to an even number and 0 is returned.
Returns:
Returns the remainder if the operation is successful. If x or y is a NaN value, this function returns a NaN value. If x is an infinity and y is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception. If y is 0 and x is not a NaN value, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVAID exception.
remainderl()
long double remainderl (long double x, long double y )
Description:
Calculates the remainder of the long double value x divided by the long double value y.
Parameters:
x | Indicates the long double value x, which is used as the numerator. |
y | Indicates the long double value y, which is used as the denominator. |
Attention:
The return value is x-n*y, where n is the value of x/y, rounded toward the nearest integer (with halfway values rounded toward the even number). For example, if the decimal part of x/y is 0.5, the value is rounded to an even number and 0 is returned.
Returns:
Returns the remainder if the operation is successful. If x or y is a NaN value, this function returns a NaN value. If x is an infinity and y is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception. If y is 0 and x is not a NaN value, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVAID exception.
remquo()
double remquo (double x, double y, int * quo )
Description:
Calculates the quotient and remainder of the double value x divided by the double value y.
The return value is x-n*y, where n is the value of x/y, rounded toward the nearest integer (with halfway values rounded toward the even number). For example, if the decimal part of x/y is 0.5, the value is rounded to an even number and 0 is returned. n is converted into a signed binary number, and the sign and the least significant three bits of the binary number are combined and stored to the pointer specified by quo. For example, if x is 29.0 and y is 3.0, the return value is -1.0 and n is 10. n is converted into a signed binary number 00001010. Therefore, 2 is stored to the pointer specified by quo.
Parameters:
x | Indicates the double value x, which is used as the numerator. |
y | Indicates the double value y, which is used as the denominator. |
quo | Indicates the pointer that stores the quotient. |
Returns:
Returns the remainder if the operation is successful. If x or y is a NaN value, this function returns a NaN value. If x is an infinity and y is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception. If y is 0 and x is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception.
remquof()
float remquof (float x, float y, int * quo )
Description:
Calculates the quotient and remainder of the float value x divided by the float value y.
The return value is x-n*y, where n is the value of x/y, rounded toward the nearest integer (with halfway values rounded toward the even number). For example, if the decimal part of x/y is 0.5, the value is rounded to an even number and 0 is returned. n is converted into a signed binary number, and the sign and the least significant three bits of the binary number are combined and stored to the pointer specified by quo. For example, if x is 29.0 and y is 3.0, the return value is -1.0 and n is 10. n is converted into a signed binary number 00001010. Therefore, 2 is stored to the pointer specified by quo.
Parameters:
x | Indicates the float value x, which is used as the numerator. |
y | Indicates the float value y, which is used as the denominator. |
quo | Indicates the pointer that stores the quotient. |
Returns:
Returns the remainder if the operation is successful. If x or y is a NaN value, this function returns a NaN value. If x is an infinity and y is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception. If y is 0 and x is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception.
remquol()
long double remquol (long double x, long double y, int * quo )
Description:
Calculates the quotient and remainder of the long double value x divided by the long double value y.
The return value is x-n*y, where n is the value of x/y, rounded toward the nearest integer (with halfway values rounded toward the even number). For example, if the decimal part of x/y is 0.5, the value is rounded to an even number and 0 is returned. n is converted into a signed binary number, and the sign and the least significant three bits of the binary number are combined and stored to the pointer specified by quo. For example, if x is 29.0 and y is 3.0, the return value is -1.0 and n is 10. n is converted into a signed binary number 00001010. Therefore, 2 is stored to the pointer specified by quo.
Parameters:
x | Indicates the long double value x, which is used as the numerator. |
y | Indicates the long double value y, which is used as the denominator. |
quo | Indicates the pointer that stores the quotient. |
Returns:
Returns the remainder if the operation is successful. If x or y is a NaN value, this function returns a NaN value. If x is an infinity and y is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception. If y is 0 and x is not a NaN value, this function returns a NaN value, reports a domain error, and throws the FE_INVAID exception.
rint()
double rint (double x)
Description:
Rounds the double value x to the nearest integer.
Parameters:
x | Indicates the double value. |
Attention:
POSIX.1-2001 records overflow range errors. If there are two nearest integers, the even integer is returned. For example, if x is 0.5, 0 is returned.
Returns:
Returns the nearest integer if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
rintf()
float rintf (float x)
Description:
Rounds the float value x to the nearest integer.
Parameters:
x | Indicates the float value. |
Attention:
POSIX.1-2001 records overflow range errors. If there are two nearest integers, the even integer is returned. For example, if x is 0.5, 0 is returned.
Returns:
Returns the nearest integer if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
rintl()
long double rintl (long double x)
Description:
Rounds the long double value x to the nearest integer.
Parameters:
x | Indicates the long double value. |
Attention:
POSIX.1-2001 records overflow range errors. If there are two nearest integers, the even integer is returned. For example, if x is 0.5, 0 is returned.
Returns:
Returns the nearest integer if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
round()
double round (double x)
Description:
Rounds the double value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the double value x. |
Attention:
Halfway values are rounded away from 0. For example, if x is 0.5, the rounded value is 1; if x is -0.5, the rounded value is -1.
Returns:
Returns the nearest integer if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
roundf()
float roundf (float x)
Description:
Rounds the float value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the float value x. |
Attention:
Halfway values are rounded away from 0. For example, if x is 0.5, the rounded value is 1; if x is -0.5, the rounded value is -1.
Returns:
Returns the nearest integer if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
roundl()
long double roundl (long double x)
Description:
Rounds the long double value x to the nearest integer, rounding away from 0.
Parameters:
x | Indicates the long double value x. |
Attention:
Halfway values are rounded away from 0. For example, if x is 0.5, the rounded value is 1; if x is -0.5, the rounded value is -1.
Returns:
Returns the nearest integer if the operation is successful; returns the passed x if x is an integer, +0, -0, a NaN value, or an infinity.
scalb()
double scalb (double x, double exp )
Description:
Multiplies the double value x by FLT_RADIX raised to the power of the double value exp, that is, x*FLT_RADIX^exp.
Parameters:
x | Indicates the double value x. |
exp | Indicates the double value used as the exponent. |
Attention:
FLT_RADIX is defined in float.h and is generally 2.
Returns:
Returns the calculation result if the operation is successful. If x or exp is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, and exp is not a negative infinity, this function returns a positive or negative infinity. If x is +0 or -0, and exp is not a positive infinity, this function returns +0 or -0. If x is 0 and exp is a positive infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If x is an infinity and exp is a negative infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If an overflow range error occurs, this function returns HUGE_VAL with the sign of x and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0 and throws the FE_UNDERFLOW exception.
scalbf()
float scalbf (float x, float exp )
Description:
Multiplies the float value x by FLT_RADIX raised to the power of the float value exp, that is, x*FLT_RADIX^exp.
Parameters:
x | Indicates the float value x. |
exp | Indicates the float value used as the exponent. |
Attention:
FLT_RADIX is defined in float.h and is generally 2.
Returns:
Returns the calculation result if the operation is successful. If x or exp is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, and exp is not a negative infinity, this function returns a positive or negative infinity. If x is +0 or -0, and exp is not a positive infinity, this function returns +0 or -0. If x is 0 and exp is a positive infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If x is an infinity and exp is a negative infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If an overflow range error occurs, this function returns HUGE_VALL with the sign of x and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0 and throws the FE_UNDERFLOW exception.
scalbln()
double scalbln (double x, long int exp )
Description:
Multiplies the double value x by FLT_RADIX raised to the power of the long int value exp, that is, x*(FLT_RADIX)^exp.
Parameters:
x | Indicates the double value x. |
exp | Indicates the double value used as the exponent. |
Attention:
FLT_RADIX is defined in float.h and is generally 2.
Returns:
Returns the calculation result if the operation is successful. If x or exp is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, and exp is not a negative infinity, this function returns a positive or negative infinity. If x is +0 or -0, and exp is not a positive infinity, this function returns +0 or -0. If x is 0 and exp is a positive infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If x is an infinity and exp is a negative infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If an overflow range error occurs, this function returns HUGE_VAL with the sign of x and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0 and throws the FE_UNDERFLOW exception.
scalblnf()
float scalblnf (float x, long int exp )
Description:
Multiplies the float value x by FLT_RADIX raised to the power of the long int value exp, that is, x*(FLT_RADIX)^exp.
Parameters:
x | Indicates the float value x. |
exp | Indicates the float value used as the exponent. |
Attention:
FLT_RADIX is defined in float.h and is generally 2.
Returns:
Returns the calculation result if the operation is successful. If x or exp is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, and exp is not a negative infinity, this function returns a positive or negative infinity. If x is +0 or -0, and exp is not a positive infinity, this function returns +0 or -0. If x is 0 and exp is a positive infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If x is an infinity and exp is a negative infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If an overflow range error occurs, this function returns HUGE_VALF with the sign of x and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0 and throws the FE_UNDERFLOW exception.
scalblnl()
long double scalblnl (long double x, long int exp )
Description:
Multiplies the long double value x by FLT_RADIX raised to the power of the long int value exp, that is, x*(FLT_RADIX)^exp.
Parameters:
x | Indicates the long double value x. |
exp | Indicates the long double value used as the exponent. |
Attention:
FLT_RADIX is defined in float.h and is generally 2.
Returns:
Returns the calculation result if the operation is successful. If x or exp is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, and exp is not a negative infinity, this function returns a positive or negative infinity. If x is +0 or -0, and exp is not a positive infinity, this function returns +0 or -0. If x is 0 and exp is a positive infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If x is an infinity and exp is a negative infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If an overflow range error occurs, this function returns HUGE_VALL with the sign of x and throws the FE_OVERFLOW exception.
scalbn()
double scalbn (double x, int exp )
Description:
Multiplies the double value x by FLT_RADIX raised to the power of the int value exp, that is, x*(FLT_RADIX)^exp.
Parameters:
x | Indicates the double value x. |
exp | Indicates the double value used as the exponent. |
Attention:
FLT_RADIX is defined in float.h and is generally 2.
Returns:
Returns the calculation result if the operation is successful. If x or exp is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, and exp is not a negative infinity, this function returns a positive or negative infinity. If x is +0 or -0, and exp is not a positive infinity, this function returns +0 or -0. If x is 0 and exp is a positive infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If x is an infinity and exp is a negative infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If an overflow range error occurs, this function returns HUGE_VAL with the sign of x and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0 and throws the FE_UNDERFLOW exception.
scalbnf()
float scalbnf (float x, int exp )
Description:
Multiplies the float value x by FLT_RADIX raised to the power of the int value exp, that is, x*(FLT_RADIX)^exp.
Parameters:
x | Indicates the float value x. |
exp | Indicates the float value used as the exponent. |
Attention:
FLT_RADIX is defined in float.h and is generally 2.
Returns:
Returns the calculation result if the operation is successful. If x or exp is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, and exp is not a negative infinity, this function returns a positive or negative infinity. If x is +0 or -0, and exp is not a positive infinity, this function returns +0 or -0. If x is 0 and exp is a positive infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If x is an infinity and exp is a negative infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If an overflow range error occurs, this function returns HUGE_VALF with the sign of x and throws the FE_OVERFLOW exception. If an underflow range error occurs, this function returns 0 and throws the FE_UNDERFLOW exception.
scalbnl()
long double scalbnl (long double x, int exp )
Description:
Multiplies the long double value x by FLT_RADIX raised to the power of the int value exp, that is, x*(FLT_RADIX)^exp.
Parameters:
x | Indicates the long double value x. |
exp | Indicates the long double value used as the exponent. |
Attention:
FLT_RADIX is defined in float.h and is generally 2.
Returns:
Returns the calculation result if the operation is successful. If x or exp is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, and exp is not a negative infinity, this function returns a positive or negative infinity. If x is +0 or -0, and exp is not a positive infinity, this function returns +0 or -0. If x is 0 and exp is a positive infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If x is an infinity and exp is a negative infinity, this function returns a NaN value, reports a domain error, and throws the FE_INVALID exception. If an overflow range error occurs, this function returns HUGE_VALL with the sign of x and throws the FE_OVERFLOW exception.
significand()
double significand (double x)
Description:
Obtains the significand of the double value x scaled to the range [1,2).
The calculation formula is x*2^-ilogb(x). This function is mainly used in certain standardized tests for IEEE 754 conformance.
Parameters:
x | Indicates the double value x. |
Returns:
Returns the significand of x if the operation is successful.
significandf()
float significandf (float x)
Description:
Obtains the significand of the float value x scaled to the range [1,2).
The calculation formula is x*2^-ilogb(x). This function is mainly used in certain standardized tests for IEEE 754 conformance.
Parameters:
x | Indicates the float value x. |
Returns:
Returns the significand of x if the operation is successful.
sin()
double sin (double x)
Description:
Calculates the sine of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the sine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
sincos()
void sincos (double x, double * sin, double * cos )
Description:
Calculates the sine and cosine of the double value x.
Parameters:
x | Indicates the double value whose sine and cosine are to be calculated. |
sin | Indicates the pointer to the obtained sine. |
cos | Indicates the pointer to the obtained cosine. |
Attention:
A domain error occurs if x is an infinity. In this case, the FE_INVALID exception is thrown, and sin and cos are both NaN values. If x is a NaN value, sin and cos are both NaN values.
sincosf()
void sincosf (float x, float * sin, float * cos )
Description:
Calculates the sine and cosine of the float value x.
Parameters:
x | Indicates the double value whose sine and cosine are to be calculated. |
sin | Indicates the pointer to the obtained sine. |
cos | Indicates the pointer to the obtained cosine. |
Attention:
A domain error occurs if x is an infinity. In this case, the FE_INVALID exception is thrown, and sin and cos are both NaN values. If x is a NaN value, sin and cos are both NaN values.
sincosl()
void sincosl (long double x, long double * sin, long double * cos )
Description:
Calculates the sine and cosine of the long double value x.
Parameters:
x | Indicates the double value whose sine and cosine are to be calculated. |
sin | Indicates the pointer to the obtained sine. |
cos | Indicates the pointer to the obtained cosine. |
Attention:
A domain error occurs if x is an infinity. In this case, the FE_INVALID exception is thrown, and sin and cos are both NaN values. If x is a NaN value, sin and cos are both NaN values.
sinf()
float sinf (float x)
Description:
Calculates the sine of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the sine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
sinh()
double sinh (double x)
Description:
Calculates the hyperbolic sine of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the hyperbolic sine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns a positive or negative infinity. If an overflow range error occurs, this function returns HUGE_VALF with the sign of x, sets errno to ERANGE, and throws the FE_INVALID exception.
sinhf()
float sinhf (float x)
Description:
Calculates the hyperbolic sine of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the hyperbolic sine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns a positive or negative infinity. If an overflow range error occurs, this function returns HUGE_VALF with the sign of x, sets errno to ERANGE, and throws the FE_INVALID exception.
sinhl()
long double sinhl (long double x)
Description:
Calculates the hyperbolic sine of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the hyperbolic sine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is +0 or -0, this function returns +0 or -0, respectively. If x is a positive or negative infinity, this function returns a positive or negative infinity. If an overflow range error occurs, this function returns HUGE_VALL with the sign of x, sets errno to ERANGE, and throws the FE_INVALID exception.
sinl()
long double sinl (long double x)
Description:
Calculates the sine of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the sine of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
sqrt()
double sqrt (double x)
Description:
Calculates the square root of double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the square root of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
sqrtf()
float sqrtf (float x)
Description:
Calculates the square root of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the square root of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
sqrtl()
long double sqrtl (long double x)
Description:
Calculates the square root of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the square root of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
tan()
double tan (double x)
Description:
Calculates the tangent of the double value x.
Parameters:
x | Indicates the double value, which represents an angle in radians. |
Returns:
Returns the tangent of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
tanf()
float tanf (float x)
Description:
Calculates the tangent of the float value x.
Parameters:
x | Indicates the float value, which represents an angle in radians. |
Returns:
Returns the tangent of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
tanh()
double tanh (double x)
Description:
Calculates the hyperbolic tangent of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the hyperbolic tangent of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
tanhf()
float tanhf (float x)
Description:
Calculates the hyperbolic tangent of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the hyperbolic tangent of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
tanhl()
long double tanhl (long double x)
Description:
Calculates the hyperbolic tangent of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the hyperbolic tangent of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
tanl()
long double tanl (long double x)
Description:
Calculates the tangent of the long double value x.
Parameters:
x | Indicates the long double value, which represents an angle in radians. |
Returns:
Returns the tangent of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0, this function returns 0. If x is less than -0, this function returns a NaN value, reports a domain error, sets errno to EDOM, and throws the FE_INVALID exception.
tgamma()
double tgamma (double x)
Description:
Calculates the gamma function of the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the gamma function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative integer or negative infinity, this function returns a NaN value, reports a domain error, and sets errno to EDOM. If an underflow range error occurs, this function returns +0. If x is +0 or -0, this function returns HUGE_VAL with the sign of x, reports a pole error, and sets errno to ERANGE. If an overflow range error occurs, this function returns HUGE_VAL and sets errno to ERANGE.
tgammaf()
float tgammaf (float x)
Description:
Calculates the gamma function of the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the gamma function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative integer or negative infinity, this function returns a NaN value, reports a domain error, and sets errno to EDOM. If an underflow range error occurs, this function returns +0. If x is +0 or -0, this function returns HUGE_VALF with the sign of x, reports a pole error, and sets errno to ERANGE. If an overflow range error occurs, this function returns HUGE_VALF and sets errno to ERANGE.
tgammal()
long double tgammal (long double x)
Description:
Calculates the gamma function of the long double value x.
Parameters:
x | Indicates the long double value. |
Returns:
Returns the gamma function of x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is a positive infinity, this function returns a positive infinity. If x is a negative integer or negative infinity, this function returns a NaN value, reports a domain error, and sets errno to EDOM. If an underflow range error occurs, this function returns +0. If x is +0 or -0, this function returns HUGE_VALL with the sign of x, reports a pole error, and sets errno to ERANGE. If an overflow range error occurs, this function returns HUGE_VALL and sets errno to ERANGE.
trunc()
double trunc (double x)
Description:
Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the double value x.
Parameters:
x | Indicates the double value x. |
Returns:
Returns the nearest integer whose absolute value is less than or equal to the absolute value of x.
truncf()
float truncf (float x)
Description:
Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the float value x.
Parameters:
x | Indicates the float value x. |
Returns:
Returns the nearest integer whose absolute value is less than or equal to the absolute value of x.
truncl()
long double truncl (long double x)
Description:
Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the long double value x.
Parameters:
x | Indicates the long double value x. |
Returns:
Returns the nearest integer whose absolute value is less than or equal to the absolute value of x.
y0()
double y0 (double x)
Description:
Calculates the Bessel function of the second kind of order 0 for the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the Bessel function of the second kind of order 0 for x if the operation is successful . If x is a NaN value, this function returns a NaN value. If x is 0.0, this function returns -HUGE_VAL and reports a pole error. If x is a negative value, this function returns -HUGE_VAL and reports a range error. If an overflow range error occurs, this function returns 0.0.
y0f()
float y0f (float x)
Description:
Calculates the Bessel function of the second kind of order 0 for the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the calculation result if the operation is successful; returns a NaN value if x is a NaN value; returns -HUGE_VALF and reports a pole error if x is 0.0; returns -HUGE_VALF and reports a domain error if x is a negative value; returns 0.0 if an overflow range error occurs.
y1()
double y1 (double x)
Description:
Calculates the Bessel function of the second kind of order 1 for the double value x.
Parameters:
x | Indicates the double value. |
Returns:
Returns the Bessel function of the second kind of order 1 for x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0.0, this function returns -HUGE_VAL and reports a pole error. If x is a negative value, this function returns -HUGE_VAL and reports a range error. If an overflow range error occurs, this function returns 0.0.
y1f()
float y1f (float x)
Description:
Calculates the Bessel function of the second kind of order 1 for the float value x.
Parameters:
x | Indicates the float value. |
Returns:
Returns the calculation result if the operation is successful; returns a NaN value if x is a NaN value; returns -HUGE_VALF and reports a pole error if x is 0.0; returns -HUGE_VALF and reports a domain error if x is a negative value; returns 0.0 if an overflow range error occurs.
yn()
double yn (int n, double x )
Description:
Calculates the Bessel function of the second kind of order n for the double value x.
Parameters:
n | Indicates the order of the Bessel function of the first kind. |
x | Indicates the double value. |
Returns:
Returns the Bessel function of the second kind of order n for x if the operation is successful. If x is a NaN value, this function returns a NaN value. If x is 0.0, this function returns -HUGE_VAL and reports a pole error. If x is a negative value, this function returns -HUGE_VAL and reports a range error. If an overflow range error occurs, this function returns 0.0.
ynf()
float ynf (int n, float x )
Description:
Calculates the Bessel function of the second kind of order n for the float value x.
Parameters:
n | Indicates the order of the Bessel function of the second kind. |
x | Indicates the float value. |
Returns:
Returns the calculation result if the operation is successful; returns a NaN value if x is a NaN value; returns -HUGE_VALF and reports a pole error if x is 0.0; returns -HUGE_VALF and reports a domain error if x is a negative value; returns 0.0 if an overflow range error occurs.