Example #1
0
 public void JacobiSnDoubleArgTest()
 {
     for (int i = 0; i < jacobiData.Length; i += 5)
     {
         var z   = jacobiData[i];
         var m   = jacobiData[i + 1];
         var ex  = jacobiData[i + 3];
         var sn  = Jacobi.sn(z, m);
         var err = Math.Abs(ex - sn) / Math.Abs(ex);
         Assert.IsTrue(err < 1e-14);
         //System.Diagnostics.Trace.WriteLine(sn);
         var f   = Jacobi.snDouble(m);
         var sn2 = f(z);
         Assert.AreEqual(sn, sn2);
     }
 }