计算方阵的行列式 (规范)
计算矩阵行列式的接口。
此接口提供计算矩阵行列式的方法。支持的数据类型包括 real
和 complex
。
注意
提供的函数仅适用于方阵。
注意
BLAS/LAPACK 后端目前不支持扩展精度 (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
! ...