Algebraic and Transcendental Functions
Algebraic functions
Function | Description |
---|---|
sq(x) | |
sqrt(x) | |
qb(x) | |
qbrt(x) |
Polynomial "poly" (Horner scheme)
The poly()
function can be used to efficiently calculate a polynomial by applying the Horner scheme. In the implementation, the explicit exponentiation of is avoided by the clever bracketing of terms.
px1 = poly(x, an, ...a1, a0);
A_Coef = [an, ...a1, a0];
px2 = poly(x, A_Coef);
In the second form, the coefficients are passed as a vector.
Transcendent functions
Function | Description |
---|---|
log(x) | , logarithm of x to the base 10 |
lg2(x) | , logarithm of x to the base 2 |
ln(x) | , natural logarithm |
ln1p(x) | , (better resolution for x close to 0) |
pow(x,y) x^y | , exponentiation of x with y |
exp10(x) | , exponentiation of 10 with x |
exp2(x) | , exponentiation of 2 with x |
exp(x) | , exponentiation of the Euler constant e with x |
expm1(x) | , (better resolution for x near 0) |
Trigonometric and arc functions
All angle arguments must be passed in radians. Accordingly, angles are also returned in radians
Function | Description |
---|---|
sin(x) | sine of x |
cos(x) | cosine of x |
tan(x) | tangent of x |
asin(x) | arc sine of x |
acos(x) | arc cosine of x |
atan(x) | arc tangent of x |
atanYX(y,x) | Inverse tangent of anticathete y and anticathete x Function also ensured for x = 0 Correct result for all quadrants in the range |
Angle conversion
Function | Description |
---|---|
rad2deg(x) | Conversion of the angle x from radians to degrees |
deg2rad(x) | Conversion of the angle x from radians to radians |
Hyperbolic and area functions
Function | Description |
---|---|
sinh(x) | hyperbolic sine of x |
cosh(x) | Cosine hyperbolic of x |
tanh(x) | hyperbolic tangent of x |
asinh(x) | area sine hyperbolic of x |
acosh(x) | area-cosine hyperbolic of x |
atanh(x) | area-tangent hyperbolic of x |