              [linalg :refer :all]
              [aux :refer :all]
              [math :refer :all]
+             [vect-math :refer [linear-frac!]]
              [real :refer [ls-residual]]]
             [uncomplicate.neanderthal.internal.api :refer [data-accessor index-factory]])
   (:import clojure.lang.ExceptionInfo


     (nrm2 (axpy! -1 w-res (ev! s w nil v))) => (roughly 0 0.01)
     (nrm2 (axpy! -1 v-res v)) => (roughly 0 0.02))))

(defn test-ge-es [factory]
  (facts

     (nrm2 (axpy! -1 (fmap! abs vl-res) (fmap! abs vl))) => (roughly 0.01378)
     (nrm2 (axpy! -1 (fmap! abs vr-res) (fmap! abs vr))) => (roughly 0.010403))))

(defn test-sy-evd [factory]
  (facts
   "LAPACK SY ev! with syevd"

   (with-release [s (sy factory 5 [-1.01,
                                   3.98, 0.53,,
