diff options
Diffstat (limited to 'linear.c')
-rw-r--r-- | linear.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -321,7 +321,7 @@ for(i=0;i<n;i++) if((double)fabs(a[i][j]) > big) big=fabs(a[i][j]); /* Bail out on singular matrix */ - if(big==(double)0.0) return(0); + if(big == 0.0) return 0; LUtempvv[i]=1.0/big; } @@ -337,7 +337,7 @@ for(j=0;j<n;j++) sum-=(a[i][k]*a[k][j]); a[i][j]=sum; } - big=(double)0.0; + big = 0.0; for(i=j;i<n;i++) { sum=a[i][j]; if(j!=0) @@ -368,7 +368,7 @@ for(j=0;j<n;j++) ** is concerned.) We'll take the original author's ** recommendation and replace 0.0 with "tiny". */ - if(a[j][j]==(double)0.0) + if(a[j][j] == 0.0) a[j][j]=tiny; if(j!=(n-1)) @@ -427,7 +427,7 @@ for(i=0;i<n;i++) ** If a nonzero element is encountered, we have ** to do the sums in the loop above. */ - if(sum!=(double)0.0) + if(sum != 0.0) ii=i; b[i]=sum; } |