Counting series functions is intersting problem for IT. Common problem for this algorithm is optimization. This program realise 3 series functions: power function, arctg, arsinh. This functions used in physics, math and some of IT areas.
Task: counting infinity series with fixed approximation. All functions must work with rational numbers. Written in c std99. Program not using math.h library.
Using Newtone's method.
Used to get fixed approximation:
gcc -std=c99 -pedantic -Wall -Wextra main.c -o ./iterations
or just
make
print all parameters:
./iterations --help
also use this parameters:
-h print help
--help
--powxa count exponntial function
--arctg count arctangens function
--argsinh count argument of sinus hyperbolic function
[0...] signification digits
[real number] exponetial function parameter
example:
./iterations --powxa 7 2.45
program will count exponential function x^2.45 with 7 digits of approximation
Input is stdin line.
Note: Program using 20 digit constant for e and pi. Currently 20 digits is maximum, but add this contants series counting is to-do.