public void JacobiArcDoubleTest() { for (int i = 0; i < jacobiData.Length; i += 5) { var z = jacobiData[i]; var m = jacobiData[i + 1]; var cn = jacobiData[i + 2]; var sn = jacobiData[i + 3]; var arc = Jacobi.arccn(cn, m); Assert.IsTrue(Math.Abs(arc - Math.Abs(z)) < 1e-14); arc = Jacobi.arcsn(sn, m); Assert.IsTrue(Math.Abs(arc - z) < 1e-14); var f = Jacobi.arccnDouble(m); arc = f(cn); Assert.IsTrue(Math.Abs(arc - Math.Abs(z)) < 1e-14); f = Jacobi.arcsnDouble(m); arc = f(sn); Assert.IsTrue(Math.Abs(arc - z) < 1e-14); } }