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

Exponential and logarithmic functions
[Math Library]


Functions

double exp (double x)
 Compute exponential function. Returns the base-e exponential function of x, which is e raised to the power x: e^x.
double frexp (double x, int *eptr)
 Get significand and exponent. Breaks the floating point number x into its binary significand (a floating point with an absolute value between 0.5(included) and 1.0(excluded)) and an integral exponent for 2, such that:
x = significand * 2^exponent
The exponent is stored in the location pointed by exp, and the significand is the value returned by the function.
If x is zero, both parts (significand and exponent) are zero.
If x is negative, the significand returned by this function is negative.
double ldexp (double x, int exp)
 Generate value from significand and exponent. Returns the result of multiplying x (the significand) by 2 raised to the power of exp (the exponent).
lexpr(x,exp) = x * 2^exp.
double log (double x)
 Compute natural logarithm. Returns the natural logarithm of x. The natural logarithm is the base-e logarithm: the inverse of the natural exponential function (exp). For common (base-10) logarithms, see log10.
double log10 (double x)
 Compute common logarithm. Returns the common (base-10) logarithm of x.
double modf (double x, double *ip)
 Break into fractional and integral parts. Breaks x into an integral and a fractional part. The integer part is stored in the object pointed by intpart, and the fractional part is returned by the function. Both parts have the same sign as x.
double remainder (double numer, double denom)
 Compute remainder. Returns the floating-point remainder of numer/denom (rounded to nearest):
remainder = numer - rquot * denom
Where rquot is the result of: numer/denom, rounded toward the nearest integral value (with halfway cases rounded toward the even number). A similar function, fmod, returns the same but with the quotient truncated (rounded towards zero) instead.

Function Documentation

double exp double  x  ) 
 

Parameters:
x Value of the exponent.
Returns:
Exponential value of x.

double frexp double  x,
int *  eptr
 

Parameters:
x Value to be decomposed.
eptr Pointer to an int where the value of the exponent is stored.
Returns:
The binary significand of x. This value is the floating point value whose absolute value lays in the interval [0.5,1) which, once multiplied by 2 raised to the power of exp, yields x.

double ldexp double  x,
int  exp
 

Parameters:
x Floating point value representing the significand.
exp Value of the exponent.
Returns:
The function returns: x * 2^exp

double log double  x  ) 
 

Parameters:
x Value whose logarithm is calculated. If the argument is negative, a domain error occurs.
Returns:
Natural logarithm of x. If x is negative, it causes a domain error. If x is zero, it may cause a pole error

double log10 double  x  ) 
 

Parameters:
x Value whose logarithm is calculated. If the argument is negative, a domain error occurs.
Returns:
Common logarithm of x. If x is negative, it causes a domain error. If x is zero, it may cause a pole error.

double modf double  x,
double *  ip
 

Parameters:
x Floating point value to break into parts.
ip Pointer to an object (of the same type as x) where the integral part is stored with the same sign as x.
Returns:
The fractional part of x, with the same sign.

double remainder 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 this remainder is zero, its sign shall be that of numer. If denom is zero, the function may either return zero or cause a domain error.
footer

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