Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,23 @@
program identitymatrix
real, dimension(:, :), allocatable :: I
character(len=8) :: fmt
integer :: ms, j
ms = 10 ! the desired size
allocate(I(ms,ms))
I = 0 ! Initialize the array.
forall(j = 1:ms) I(j,j) = 1 ! Set the diagonal.
! I is the identity matrix, let's show it:
write (fmt, '(A,I2,A)') '(', ms, 'F6.2)'
! if you consider to have used the (row, col) convention,
! the following will print the transposed matrix (col, row)
! but I' = I, so it's not important here
write (*, fmt) I(:,:)
deallocate(I)
end program identitymatrix

View file

@ -0,0 +1,9 @@
Program Identity
Integer N
Parameter (N = 666)
Real A(N,N)
Integer i,j
ForAll(i = 1:N, j = 1:N) A(i,j) = (i/j)*(j/i)
END

View file

@ -0,0 +1,3 @@
DO 1 I = 1,N
DO 1 J = 1,N
1 A(I,J) = (I/J)*(J/I)