Ejemplo n.º 1
0
 public void BesselY0Approx([Range(0.25, 3, 0.25)] double x)
 {
     // Approx by Abramowitz/Stegun 9.4.2
     Assert.AreEqual(
         Evaluate.Polynomial(x / 3.0, 2.0 / Math.PI * Math.Log(x / 2.0) * SpecialFunctions.BesselJ(0, x) + 0.36746691, 0.0, 0.60559366, 0.0, -0.74350384, 0.0, 0.25300117, 0.0, -0.04261214, 0.0, 0.00427916, 0.0, -0.00024846),
         SpecialFunctions.BesselY(0, x), 1e-7);
 }
Ejemplo n.º 2
0
 public void ComplexBesselYnExact(double v, double zr, double zi, double cyr, double cyi, int decimalPlaces)
 {
     AssertHelpers.AlmostEqualRelative(
         new Complex(cyr, cyi),
         SpecialFunctions.BesselY(v, new Complex(zr, zi)),
         decimalPlaces
         );
 }