Skip to content

Latest commit

 

History

History

108-Trigo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 




108-Trigo

 

As you may know (or not), the exponential function can be written as the sum of a power series:

 

$$ e^x = \sum_{ n=0 }^∞ { x^n \over n! } = 1 + x + { x^2 \over 2! } + { x^3 \over 3! } + ... $$

 

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.

 

🏅 Results

Cat Percentages
Basic 100%
cosine 60%
sine 60%
exponential 60%
hyperbolic cosine 60%
hyperbolic sine 60%
Rigor 100%
Total 72.2%

 

ℹ️ Usage

./108trigo fun a0 a1 a2 ...

 

📝 Description

fun function to be applied, among at least “EXP”, “COS”, “SIN”, “COSH” and “SINH”
ai coeficients of the matrix