Closed mchampine closed 2 years ago
[uncomplicate/neanderthal "0.43.1"] [uncomplicate.neanderthal.linalg :as linalg]
(def my2x2 (dge 2 2 [2 -3 4 1])) ;; => #RealGEMatrix[double, mxn:2x2, layout:column, offset:0] ;; ▥ ↓ ↓ ┓ ;; → 2.00 4.00 ;; → -3.00 1.00 ;; ┗ ┛
(linalg/det (linalg/trf my2x2)) ;; => -14.0
But the determinant should be 14: 2x1 - (-3x4) = 2 + 12 = 14
Hi @mchampine
Thank you for discovering and reporting this bug. The fixed version 0.43.3 has just been released to Clojars.
[uncomplicate/neanderthal "0.43.1"] [uncomplicate.neanderthal.linalg :as linalg]
(def my2x2 (dge 2 2 [2 -3 4 1])) ;; => #RealGEMatrix[double, mxn:2x2, layout:column, offset:0] ;; ▥ ↓ ↓ ┓
;; → 2.00 4.00
;; → -3.00 1.00
;; ┗ ┛
(linalg/det (linalg/trf my2x2)) ;; => -14.0
But the determinant should be 14: 2x1 - (-3x4) = 2 + 12 = 14