test_007 Subroutine

subroutine test_007(id, nfail)

Uses

  • proc~~test_007~~UsesGraph proc~test_007 test_007 module~forcolormap_utils forcolormap_utils proc~test_007->module~forcolormap_utils module~forcolormap_parameters forcolormap_parameters module~forcolormap_utils->module~forcolormap_parameters iso_fortran_env iso_fortran_env module~forcolormap_parameters->iso_fortran_env

Confirm the recurrence relation n! = n·(n-1)! for a representative n.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: id
integer, intent(inout) :: nfail

Calls

proc~~test_007~~CallsGraph proc~test_007 test_007 proc~factorial factorial proc~test_007->proc~factorial proc~report_test report_test proc~test_007->proc~report_test

Called by

proc~~test_007~~CalledByGraph proc~test_007 test_007 program~check check program~check->proc~test_007

Source Code

   subroutine test_007(id, nfail)
      use forcolormap_utils, only: factorial
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "factorial: recurrence n! = n*(n-1)!"
      logical :: ok
      integer :: n

      n = 7
      ok = (factorial(n) == n * factorial(n-1))
      call report_test(name, ok, id, nfail)
   end subroutine test_007