dcpabs Function

private function dcpabs(x, y)

evaluation of sqrt(x*x + y*y)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y

Return Value real(kind=wp)


Called by

proc~~dcpabs~~CalledByGraph proc~dcpabs polyroots_module::dcpabs proc~dcsqrt polyroots_module::dcsqrt proc~dcsqrt->proc~dcpabs proc~dqtcrt polyroots_module::dqtcrt proc~dqtcrt->proc~dcsqrt

Source Code

real(wp) function dcpabs(x,y)

    real(wp),intent(in) :: x , y
    real(wp) :: a

    if ( abs(x)>abs(y) ) then
        a = y/x
        dcpabs = abs(x)*sqrt(1.0_wp+a*a)
    elseif ( y==0.0_wp ) then
        dcpabs = 0.0_wp
    else
        a = x/y
        dcpabs = abs(y)*sqrt(1.0_wp+a*a)
    end if

end function dcpabs