update leibniz and wallis use reduce