I just finished my application but for this subroutine
subroutine back_substitution(s, c)
implicit none
double precision, dimension,, intent(out) :: s
double precision, dimension), intent(out) :: c
real :: w
integer :: i, j, n
n = size(c)
do i = n, 1, -1
w = c(i)
do j = i + 1, n
w = w - s(i, j)*c(j)
end do
c(i) = w/s(i, i)
end do
end subroutine back_substitution
I'm receiving NaN for c(i).
Why is that happen?
subroutine back_substitution(s, c)
implicit none
double precision, dimension,, intent(out) :: s
double precision, dimension), intent(out) :: c
real :: w
integer :: i, j, n
n = size(c)
do i = n, 1, -1
w = c(i)
do j = i + 1, n
w = w - s(i, j)*c(j)
end do
c(i) = w/s(i, i)
end do
end subroutine back_substitution
I'm receiving NaN for c(i).
Why is that happen?