Initialize the tester.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(out) | :: | this |
The tester. |
||
real(kind=real32), | intent(in), | optional | :: | tolerance32 |
Real tolerance, 32 bits. |
|
real(kind=real64), | intent(in), | optional | :: | tolerance64 |
Real tolerance, 64 bits. |
subroutine init(this, tolerance32, tolerance64) class(tester_t), intent(out) :: this !< The tester. real(real32), intent(in), optional :: tolerance32 !< Real tolerance, 32 bits. real(real64), intent(in), optional :: tolerance64 !< Real tolerance, 64 bits. this% n_errors = 0 this% n_tests = 0 if (present(tolerance64)) then this% tolerance64 = tolerance64 else this% tolerance64 = 2._real64*epsilon(1._real64) end if if (present(tolerance32)) then this% tolerance32 = tolerance32 else this% tolerance32 = 2._real32*epsilon(1._real32) end if end subroutine init