This C repository, developed during the course of AN410 Numerical Analysis - A.A.2019/19, is a collection of programs for scientific calculus application.
It follows a list of the main methods implemented:
- Direct methods for solving linear systems
- Gauss Elimination
- LU Factorization
- Cholesky Factorization
- Doolittle Factorization
- QR factorization
- Iteratives methods for solving linear systems
- Jacobi method
- Gauss-Seidel method
- Sor method
- Richardson
- Recursive methods for function zeros
- Bisection
- Chord
- Muller
- Newton
- Newton Quotient
- Secantes
- Steffensen
- Interpolation methods for function approximation over equidistant/chebyshev knots
- Lagrange interpolate
- Newton interpolate
- Hermite interpolate
- Least-square method for function approximation
- First Order Least-squares
- Higher Order Least-Squares
Even if it is not necessary, an useful tool called by the program is GnuPlot.
To change the path to the executable of GnuPlot it is necessary to change the macro defined in
src/utils/an1.utils.h.
- gnuplot-scripts: Contains the
GnuPlotscripts called from inside the C code. - results: Contains the computation output of the program.
- source: Contains all the default parsing
.txtfiles. - src: Source folder of the
.cand.hfiles:- direct: direct methods implementation
- function-zeros: function zeros evaluation methods implementation
- interpolation: interpolation methods implementation
- iteratives: iteratives methods implementation
- utils: all the utilities usefull for the program
an1.utils.hutils_functions.cutils_matrices.cutils_systems.cutils_utility.cutils_vectors.c
The file src/utils/an1.utils.h also declare all the macros used here also as global parameter.
Some of them could be modified in order to change the outputs:
| Macro | Usage |
|---|---|
lfpf |
long float print format |
flfpf |
long float print format over files |
gnuplot(x) |
gnuplot application path |
MAX_ATTEMPTs |
max attempts for iterative methods |
MAX_ERRs |
max number of errors during choosing |
ERR |
default max error for approximations |
MAX_POINTs |
max number of data points that could be evaluated |
CONST_DATA |
number of data points for sample functions evaluation |
- AN410 lecture notes by R. Ferretti;
- Matematica Numerica ed.3 by A. Quarteroni - R. Sacco - F. Saleri QSS08;