Both xValues.dat or yValues.dat must follow this format:
- The first value in the file represents the number of data points.
- The following values are the respective x or y coordinates.
Use the following command to compile the code:
gcc secant.c -lm -o secant.outRun:
./secant.out 10 Note: The number 10 represents the number of iterations.
use this command to compile the code:
gcc jacobian.c -lm -o jacobian.outRun:
./jacobian.out coefficients.dat constantTerms.datNote: Ensure that coefficients.dat and constantTerms.dat are present in the directory with the program and the first value in the file represents the number of elements.
gcc lagrange.c -o lagrangeRun:
./lagrange xValues.dat yValues.datDebug mode (with additional output for debugging):
gcc lagrange.c -D DEBUG -o lagrangeRun:
./lagrange xValues.dat yValues.dat gcc lagrangeWithThreads.c -lm -o lagrangeThreadsRun:
./lagrangeThreads 2 xValues.dat yValues.datNote: num_threads specifies the number of threads to use (first argument).
Note: Ensure that xValues.dat and yValues.dat are present in the directory with the program.
The program solves a system of linear equations using the Gauss-Seidel method and prints the corresponding interpolating polynomial
gcc sel.c -lm -o sel.outRun:
./sel.out x.dat fx.datNote: Ensure that x.dat and fx.dat are present in the directory with the program and used the correct format.
Note: The program internally calls exec to run Gauss-Seidel and print the results (in Gauss-Seidel).
It calculates the interpolating polynomial using the Newton form and can be used to estimate the function polynomial.
gcc newton_points.c -o newton.outRun:
./newton.out x.dat fx.datNote: Ensure that x.dat and fx.dat are present in the directory with the program and used the correct format.