det2 Function

public pure function det2(A) result(det)

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(2,2):: A

Return Value real(kind=wp)


Called by

proc~~det2~~CalledByGraph proc~det2 det2 proc~inv2 inv2 proc~inv2->proc~det2

Contents

Source Code


Source Code

  pure function det2(A) result(det)
    ! Computes the determinant of a 2x2 matrix
    real(wp), dimension(2,2), intent(in)  :: A
    real(wp)                              :: det

    det = A(1,1)*A(2,2) - A(1,2)*A(2,1)

    return
  end function det2