So does many other functions, such as trigonometric and hyperbolic functions.
These power series are extremely handy when it comes to fast approximations of all those functions.
But they can also be used to exponentiate (for instance) mathematical objects (as long as they can be elevated to integer powers).
One could for example compute the cosine of a function, the exponentiation of a graph,
the hyperbolic tangent of a rotation or the sine of a square matrix (which is what we've done here) ...
Given a matrix and the name of a function, this program apply the latter to the former, and print the result.
Cat | Percentages |
---|---|
Basic | 100% |
cosine | 60% |
sine | 60% |
exponential | 60% |
hyperbolic cosine | 60% |
hyperbolic sine | 60% |
Rigor | 100% |
Total | 72.2% |
./108trigo fun a0 a1 a2 ...
fun function to be applied, among at least “EXP”, “COS”, “SIN”, “COSH” and “SINH”
ai coeficients of the matrix