Variance algorithm for minimization | Synapse