LCOV - code coverage report
Current view: top level - math - DoubleFactorial.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 7 7 100.0 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             : module m_DoubleFactorial
       2             : 
       3             : implicit none
       4             : 
       5             : 
       6             : contains
       7             : 
       8             :   
       9      179115 : real function DoubleFactorial( n_upper, n_lower )
      10             : ! calculates ( 2 * n_upper + 1 ) !! / ( 2 * n_lower + 1 ) !! or just ( 2 * n_upper + 1 ) !!, if n_lower is not present
      11             : 
      12             :   integer           :: n_upper
      13             :   integer, optional :: n_lower
      14             :   integer           :: i, i_lower
      15             : 
      16      179115 :   i_lower = 1
      17      179115 :   if( present(n_lower) ) i_lower = n_lower + 1
      18             : 
      19      179115 :   DoubleFactorial = 1.
      20      959197 :   do i = i_lower, n_upper
      21      959197 :     DoubleFactorial = DoubleFactorial * ( 2 * i + 1 )
      22             :   end do
      23             : 
      24      179115 : end function DoubleFactorial
      25             : 
      26             : 
      27             : end module m_DoubleFactorial

Generated by: LCOV version 1.13