Update main calculation algorithm.