aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-04-25 15:40:01 +0200
committerWojtek Kosior <kwojtus@protonmail.com>2019-04-25 15:40:01 +0200
commit8dcae093d132674ad3c8c99178885314bb15248a (patch)
tree863b319dedaab716eba66c5b24c66dc58e5328d3 /src
parentaedd7ea98c1cbc363741c8869f506c228bd9ef85 (diff)
downloadfortran-assignment1-8dcae093d132674ad3c8c99178885314bb15248a.tar.gz
fortran-assignment1-8dcae093d132674ad3c8c99178885314bb15248a.zip
fix indexing bug
Diffstat (limited to 'src')
-rw-r--r--src/bettermath2.F906
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bettermath2.F90 b/src/bettermath2.F90
index 0baa473..d1eaa37 100644
--- a/src/bettermath2.F90
+++ b/src/bettermath2.F90
@@ -49,7 +49,7 @@ CONTAINS
DO j = 1, size(B, 2)
DO k = 1, size(A, 2)
- C(:,j) = C(:,j) + A(:,j) * B(k,j)
+ C(:,j) = C(:,j) + A(:,k) * B(k,j)
END DO
END DO
@@ -66,7 +66,7 @@ CONTAINS
DO j = 1, size(B, 2)
DO k = 1, size(A, 2)
- C(:,j) = C(:,j) + A(:,j) * B(k,j)
+ C(:,j) = C(:,j) + A(:,k) * B(k,j)
END DO
END DO
@@ -83,7 +83,7 @@ CONTAINS
DO j = 1, size(B, 2)
DO k = 1, size(A, 2)
- C(:,j) = C(:,j) + A(:,j) * B(k,j)
+ C(:,j) = C(:,j) + A(:,k) * B(k,j)
END DO
END DO