Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Power functions
[Math Library]


Functions

double pow (double base, double exponent)
 Raise to power. Returns base raised to the power exponent:
base^exponent
.
double sqrt (double x)
 Compute square root.
double fmod (double numer, double denom)
 Compute remainder of division. Returns the floating-point remainder of numer/denom (rounded towards zero):
fmod = numer - tquot * denom Where tquot is the truncated (i.e., rounded towards zero) result of: numer/denom.

Function Documentation

double fmod double  numer,
double  denom
 

Parameters:
numer Value of the quotient numerator.
denom Value of the quotient denominator.
Returns:
The remainder of dividing the arguments. If denom is zero, the function may either return zero or cause a domain error.

double pow double  base,
double  exponent
 

Parameters:
base Base value.
exponent Exponent value.
Returns:
The result of raising base to the power exponent. If the base is finite negative and the exponent is finite but not an integer value, it causes a domain error. If both base and exponent are zero, it may also cause a domain error on certain implementations. If base is zero and exponent is negative, it may cause a domain error or a pole error (or none, depending on the library implementation). The function may also cause a range error if the result is too great or too small to be represented by a value of the return type.

double sqrt double  x  ) 
 

Parameters:
x Value whose square root is computed. If the argument is negative, a domain error occurs.
Returns:
Square root of x.
footer

otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0