Beispiel #1
0
 public void JacobiMultiDoubleTest()
 {
     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 dn    = jacobiData[i + 4];
         var multi = Jacobi.Multi(z, m);
         Assert.IsTrue(Math.Abs(cn - multi.cn) < 1e-14);
         Assert.IsTrue(Math.Abs(sn - multi.sn) < 1e-14);
         Assert.IsTrue(Math.Abs(dn - multi.dn) < 1e-14);
         var fm = Jacobi.MultiDouble(m);
         var m2 = fm(z);
         Assert.AreEqual(multi.cn, m2.cn);
         Assert.AreEqual(multi.sn, m2.sn);
         Assert.AreEqual(multi.dn, m2.dn);
     }
 }