shmkep Function

public pure function shmkep(g1, s)

Accurate computation of s - (1 - g1)*asinh(s) when (g1, s) is close to (0, 0)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: g1
real(kind=wp), intent(in) :: s

Return Value real(kind=wp)


Called by

proc~~shmkep~~CalledByGraph proc~shmkep gooding_module::shmkep proc~pv2els gooding_module::pv2els proc~pv2els->proc~shmkep proc~shkepl gooding_module::shkepl proc~shkepl->proc~shmkep proc~els2pv gooding_module::els2pv proc~els2pv->proc~shkepl proc~pv3els gooding_module::pv3els proc~pv3els->proc~pv2els proc~els3pv gooding_module::els3pv proc~els3pv->proc~els2pv proc~lambert_test lambert_module::lambert_test proc~lambert_test->proc~pv3els proc~propagate gooding_module::propagate proc~propagate->proc~pv3els proc~propagate->proc~els3pv

Source Code

    pure function shmkep (g1, s)

    implicit none

    real(wp)            :: shmkep
    real(wp),intent(in) :: g1
    real(wp),intent(in) :: s

    real(wp) :: g,t,tsq,x,term,twoi1,x0

    g = one - g1
    t = s/(one + sqrt(one + s*s))
    tsq = t*t
    x = s*(g1 + g*tsq)
    term = two*g*t
    twoi1 = one

    do

        twoi1 = twoi1 + two
        term = term*tsq
        x0 = x
        x = x - term/twoi1
        if (x==x0) exit

     end do

     shmkep = x

     end function shmkep