Validate the published constant pi against acos(-1) to working precision.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
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