compute and store factorials upto 12!
subroutine compute_factorials() integer :: i factorial(0) = 1.0_dp do i = 1, MAX_ORDER factorial(i) = factorial(i-1) * real(i, dp) end do end subroutine compute_factorials