Computes the determinant of a square matrix (Specification)
Interface for computing matrix determinant.
This interface provides methods for computing the determinant of a matrix.
Supported data types include real
and complex
.
Note
The provided functions are intended for square matrices only.
Note
BLAS/LAPACK backends do not currently support extended precision (xdp
).
real(sp) :: a(3,3), d
type(linalg_state_type) :: state
a = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3])
! ...
d = det(a,err=state)
if (state%ok()) then
print *, 'Success! det=',d
else
print *, state%print()
endif
! ...