Lock-in correlation is scanned across sample length and reference choice. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
A matching reference adds one product per sample
With four matching samples, every product is one and the correlation sum is four.
1+1+1+1=4
A longer matching run raises the correlation sum
When the reference matches every sample, correlation grows with the number of visible products.