NLAlib.ShiftedQR.complexDivideWithScratch_writes
Library · theorem
Exact arithmetic
Eleven actual scalar instructions compute the exact quotient whenever the complex input denominator is nonzero. Both inputs may exactly alias the output pair, since the numerators are retained before either output is written. [GolubVanLoan2013, §1.1.3]. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.
NLAlib.ShiftedQR.complexDivideWithScratch_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
{M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hI : Ops.IsScalar M I) (hM : Ops.ExactModel id M)
{τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {x y t z : ℕ × ℕ} {xv yv : ℂ} (htx : t.1 ≠ x.1) (hty : t.1 ≠ y.1)
(htz : t.1 ≠ z.1) (hyv : yv ≠ 0) (hx0 : m.store.get x.1 x.2 = some xv.re)
(hx1 : m.store.get x.1 (x.2 + 1) = some xv.im) (hy0 : m.store.get y.1 y.2 = some yv.re)
(hy1 : m.store.get y.1 (y.2 + 1) = some yv.im) (ht : t.2 + 4 ≤ m.store.len t.1)
(hz : z.2 + 2 ≤ m.store.len z.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.complexDivideWithScratch (Ops.Env.frame [] [x, y, t, z])
(Ops.Fp.blocks [t, z] [4, 2])
(fun μ ↦ μ.pos = m.pos ∧ μ.store.readBlock z.1 z.2 2 = some [(xv / yv).re, (xv / yv).im]) mImport NLAlib.Eigensolvers.ShiftedQR.Division.