public void JacobiCnDoubleArgTest() { for (int i = 0; i < jacobiData.Length; i += 5) { var z = jacobiData[i]; var m = jacobiData[i + 1]; var ex = jacobiData[i + 2]; var cn = Jacobi.cn(z, m); var err = Math.Abs(ex - cn) / Math.Abs(ex); Assert.IsTrue(err < 1e-15); var f = Jacobi.cnDouble(m); var cn2 = f(z); Assert.AreEqual(cn, cn2); } }