From c5140a0728dc332fba575064efef12c0acf7b8a9 Mon Sep 17 00:00:00 2001 From: Jose Alves Date: Fri, 29 Sep 2023 23:02:57 +0200 Subject: [PATCH] include test for hyperbolic functions --- test/test_fast_math.f90 | 177 +++++++++++++++++++++++++++++++--------- 1 file changed, 137 insertions(+), 40 deletions(-) diff --git a/test/test_fast_math.f90 b/test/test_fast_math.f90 index f404b9b..ff817f1 100644 --- a/test/test_fast_math.f90 +++ b/test/test_fast_math.f90 @@ -4,8 +4,7 @@ module test_fast_math use fast_math implicit none - logical :: verbose = .false. ! change me to .true. if you want to see the results - character (len=*), parameter :: fmt_cr = "(a10,*(f22.12))", fmt_er = "(a10,*(es22.4))" + logical :: verbose = .true. ! change me to .true. if you want to see the results contains !> Collect all exported unit tests @@ -16,7 +15,8 @@ subroutine collect_suite(testsuite) testsuite = [ & new_unittest('fast_sum', test_fast_sum) , & new_unittest('fast_dotp', test_fast_dotproduct) , & - new_unittest('fast_trig', test_fast_trigonometry) & + new_unittest('fast_trig', test_fast_trigonometry) , & + new_unittest('fast_hyper', test_fast_hyperbolic ) & ] end subroutine @@ -28,6 +28,7 @@ subroutine test_fast_sum(error) integer, parameter :: n = 1e6, ncalc = 4, niter = 20 integer :: iter, i real(dp) :: times(0:ncalc), times_tot(ncalc) + 1 format(a10,':