NLA-lib Explorer

Worked instance: the entrywise sum of two vectors

Library · Source module

Worked instance: the entrywise sum of two vectors

The certified program NLAlib.Ops.Examples.VectorSum.vaddProgram, a loop over the cells of three blocks, run with exact real arithmetic on \mathbf{x} = (1, 2, 3) and y = (10, 20, 30).

Expected, from scripts/worked_instances.py (VectorSum): the output [11, 22, 33] and 3 additions. The total of 44 instructions and the formula 14 n + 2 are regression values.

Main results

* NLAlib.Ops.Examples.WorkedInstances.VectorSum.calls, NLAlib.Ops.Examples.WorkedInstances.VectorSum.work, NLAlib.Ops.Examples.WorkedInstances.VectorSum.peak: the calls, the instructions and the scratch of the tree at every length. * NLAlib.Ops.Examples.WorkedInstances.VectorSum.instance_run: the run on the instance.

Declarations