Modifications
This commit is contained in:
parent
659896de63
commit
5023793832
|
@ -6,13 +6,13 @@
|
|||
|
||||
// 1)
|
||||
|
||||
float D3diag(int n, double* a, double* b, double* c) {
|
||||
float D[n];
|
||||
double D3diag(int n, double* a, double* b, double* c) {
|
||||
double D[n];
|
||||
int i;
|
||||
D[0] = b[0];
|
||||
D[1] = b[0] * b[1] - a[1] * c[0];
|
||||
for (i = 2; i < n; i++) {
|
||||
D[i] = b[i] * D[i-1] - a[i] * c[i-2] * D[i-2];
|
||||
D[i] = b[i] * D[i-1] - a[i] * c[i-1] * D[i-2];
|
||||
}
|
||||
return D[i];
|
||||
}
|
||||
|
|
Reference in a new issue