This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define CLC 4 | |
| #define DATA 3 | |
| #define LOAD 2 | |
| //http://micrus.ru/pdf/TIC55.pdf | |
| //346501287 | |
| //degfabchp | |
| //phcbafged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <iostream> | |
| #include <limits> | |
| #include <math.h> | |
| #include <omp.h> | |
| const int R = 12; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cmath> | |
| #include <limits> | |
| #include <omp.h> | |
| const int R = 10; | |
| const int N = pow(2, R); | |
| const double h = (1.0 / N); | |
| const double eps = 0.000001; | |
| const double bmin = 0.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <omp.h> | |
| #include <math.h> | |
| double f(double x) | |
| { | |
| if (x == 0.0) return 0.0; | |
| return sin(1/x); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def print_table(self): | |
| for line in self.table: | |
| print line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def print_table(self): | |
| for line in self.table: | |
| print line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def calc(self, x): | |
| result = 0.0 | |
| for i in range (0, self.size): | |
| prod = 1.0; | |
| for j in range(0, i): | |
| prod *= (x-self.points[j]) | |
| result += self.coefs[i] * prod | |
| return result |
NewerOlder