Javascript – Compute arithmetic-geometric mean of arbitrary array length in JS
The arithmetic-geometric mean of two numbers is defined as the limit of a sequence of arithmetic and geometric means. Here is what I have for one iteration with two numbers: function agm2(n) { /** * @param {Float64Array(2)} n */ var…