anchor.diff:  module private SVDHelpers =
       let inline pythag a b = sqrt (a*a + b*b)
   
  -    let inline svdBidiagonalNative (anorm : ^a) (U : NativeMatrix< ^a >) (B : NativeMatrix< ^a >) (Vt : NativeMatrix< ^a >) : unit =
  +    let inline svdBidiagonalNative (anorm : ^a) (U : NativeMatrix< ^a >) (B : NativeMatrix< ^a >) (Vt : NativeMatrix< ^a >) : bool =
           let two = LanguagePrimitives.GenericOne + LanguagePrimitives.GenericOne
           let mutable c : ^a = LanguagePrimitives.GenericZero
           let mutable s = LanguagePrimitives.GenericZero
           let mutable rvl0 = LanguagePrimitives.GenericZero
  +        let mutable suc = true
   
           let n = int B.SY
           let m = int B.SX
  
positive.code:         SVD.decomposeInPlace a b c
  
          let arr = Array2D.init 10 10 (fun i j -> 0.1)
          let (U, B, Vt) = SVD.decompose arr
  
          ()
  
negative.code:         let U = Array2D.zeroCreate r r
          let S = Array2D.copy m
          let Vt = Array2D.zeroCreate c c
          if SVD.DecomposeInPlace(U, S, Vt) then
              Some (U, S, Vt)
          else
              None
          
  
      static member Decompose(m : M22d) =
          let mutable S = m
          let mutable U = M22d()
          let mutable Vt = M22d()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
      static member Decompose(m : M23d) =
          let mutable S = m
          let mutable U = M22d()
          let mutable Vt = M33d()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
      static member Decompose(m : M33d) =
          let mutable S = m
          let mutable U = M33d()
          let mutable Vt = M33d()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
      static member Decompose(m : M34d) =
          let mutable S = m
          let mutable U = M33d()
          let mutable Vt = M44d()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
      static member Decompose(m : M44d) =
          let mutable S = m
          let mutable U = M44d()
          let mutable Vt = M44d()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
  
      static member Decompose(m : M22f) =
          let mutable S = m
          let mutable U = M22f()
          let mutable Vt = M22f()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
      static member Decompose(m : M23f) =
          let mutable S = m
          let mutable U = M22f()
          let mutable Vt = M33f()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
      static member Decompose(m : M33f) =
          let mutable S = m
          let mutable U = M33f()
          let mutable Vt = M33f()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
      static member Decompose(m : M34f) =
          let mutable S = m
          let mutable U = M33f()
          let mutable Vt = M44f()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
  
      static member Decompose(m : M44f) =
          let mutable S = m
          let mutable U = M44f()
          let mutable Vt = M44f()
          let mutable suc = false
          tensor {
              let! pS = &S
              let! pU = &U
              let! pVt = &Vt
              suc <- SVD.DecomposeInPlace(pU, pS, pVt)
          }
          if suc then
              Some (U, S, Vt)
          else
              None
          
  
  
  