TotalView Fortran Serial Exercise 1 - Solution

A solution

The first DO loop should run from 1 to 10 instead of 2 to 10. When the first number is not set in this loop, it remains zero. When we take the Log of zero, it gives NaN or -Infinity.