LCOV - code coverage report
Current view: top level - math - ExpSave.f90 (source / functions) Hit Total Coverage
Test: FLEUR test coverage Lines: 0 9 0.0 %
Date: 2024-03-29 04:21:46 Functions: 0 1 0.0 %

          Line data    Source code
       1             : module m_ExpSave
       2             : 
       3             :   contains
       4             : 
       5           0 :   pure real function exp_save( x )
       6             :     ! replace exp by a function that does not under/overflow dw09
       7             :     implicit none
       8             :     real, intent(in)      :: x
       9             :     real, parameter       :: maxexp = log( 2.0 ) * maxexponent( 2.0 )
      10             :     real, parameter       :: minexp = log( 2.0 ) * minexponent( 2.0 )
      11             : 
      12           0 :     if ( abs( x ) > minexp .and. abs( x ) < maxexp ) then
      13           0 :       exp_save = exp( x )
      14             :     else
      15           0 :       if ( x > 0 ) then
      16           0 :         if ( x > minexp ) then
      17             :           exp_save = exp( maxexp )
      18             :         else
      19           0 :           exp_save = exp( minexp )
      20             :         endif
      21             :       else
      22           0 :         if ( - x > minexp ) then
      23             :           exp_save = exp( - maxexp )
      24             :         else
      25           0 :           exp_save = exp( - minexp )
      26             :         endif
      27             :       endif
      28             :     endif
      29             : 
      30           0 :   end function exp_save
      31             : 
      32             : end module m_ExpSave

Generated by: LCOV version 1.14