test_001 Subroutine

subroutine test_001(id, nfail)

Uses

  • proc~~test_001~~UsesGraph proc~test_001 test_001 module~forcolormap_parameters forcolormap_parameters proc~test_001->module~forcolormap_parameters iso_fortran_env iso_fortran_env module~forcolormap_parameters->iso_fortran_env

Validate the published constant pi against acos(-1) to working precision.

Arguments

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

Calls

proc~~test_001~~CallsGraph proc~test_001 test_001 proc~report_test report_test proc~test_001->proc~report_test

Called by

proc~~test_001~~CalledByGraph proc~test_001 test_001 program~check check program~check->proc~test_001

Source Code

   subroutine test_001(id, nfail)
      use forcolormap_parameters, only: wp, pi
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "pi ~= acos(-1)"
      logical :: ok
      real(wp), parameter :: tol = 1.0e-15_wp
      real(wp) :: p

      p  = acos(-1.0_wp)
      ok = abs(pi - p) <= tol
      call report_test(name, ok, id, nfail)
   end subroutine test_001