abs_int4_sign Function

private pure function abs_int4_sign(sgn)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: sgn(lenof_sign/inum_runs)

Return Value real(kind=dp)


Contents

Source Code


Source Code

    pure real(dp) function abs_int4_sign(sgn)
        integer(int32), intent(in) :: sgn(lenof_sign / inum_runs)

#ifdef CMPLX_
        abs_int4_sign = real(int(sqrt(real(sgn(1), dp)**2 + real(sgn(2), dp)**2)), dp)
        ! The integerisation here is an approximation, but one that is
        ! used in the integer algorithm, so is retained in this real
        ! version of the algorithm
#else
        abs_int4_sign = real(abs(sgn(1)), dp)
#endif
    end function abs_int4_sign