public void TestSpecialFunctions_Beta() { // Symmetry: Assert.That(Fn.Beta(0.1, 1.0), NumericIs.AlmostEqualTo(Fn.Beta(1.0, 0.1)), "A1"); Assert.That(Fn.Beta(0.1, 10.0), NumericIs.AlmostEqualTo(Fn.Beta(10.0, 0.1)), "A2"); Assert.That(Fn.Beta(0.5, 1.0), NumericIs.AlmostEqualTo(Fn.Beta(1.0, 0.5)), "A3"); Assert.That(Fn.Beta(0.5, 10.0), NumericIs.AlmostEqualTo(Fn.Beta(10.0, 0.5)), "A4"); Assert.That(Fn.Beta(10.0, 100.0), NumericIs.AlmostEqualTo(Fn.Beta(100.0, 10.0)), "A1"); // Compare with Maple: "evalf(Beta(0.1,x),20);", with relative accuracy Assert.That(Fn.Beta(0.1, 0.1), NumericIs.AlmostEqualTo(19.714639489050161663), "B1"); Assert.That(Fn.Beta(0.1, 0.2), NumericIs.AlmostEqualTo(14.599371492764829943), "B2"); Assert.That(Fn.Beta(0.1, 0.3), NumericIs.AlmostEqualTo(12.830598536321300437), "B3"); Assert.That(Fn.Beta(0.1, 1.0), NumericIs.AlmostEqualTo(10.0), "B4"); Assert.That(Fn.Beta(0.1, 2.0), NumericIs.AlmostEqualTo(9.0909090909090909091), "B5"); Assert.That(Fn.Beta(0.1, 5.0), NumericIs.AlmostEqualTo(8.1743590791584497328), "B6"); Assert.That(Fn.Beta(0.1, 10.0), NumericIs.AlmostEqualTo(7.5913800009109903433), "B7"); Assert.That(Fn.Beta(0.1, 100.0), NumericIs.AlmostEqualTo(6.0053229390929389725, 1e-12), "B8"); // Compare with Maple: "evalf(Beta(25.0,x),20);", with relative accuracy Assert.That(Fn.Beta(25.0, 0.1), NumericIs.AlmostEqualTo(6.9076854432998202098, 1e-13), "C1"); Assert.That(Fn.Beta(25.0, 0.2), NumericIs.AlmostEqualTo(2.4193558279880311532, 1e-14), "C2"); Assert.That(Fn.Beta(25.0, 0.3), NumericIs.AlmostEqualTo(1.1437887414566949564, 1e-14), "C3"); Assert.That(Fn.Beta(25.0, 1.0), NumericIs.AlmostEqualTo(.40000000000000000000e-1, 1e-14), "C4"); Assert.That(Fn.Beta(25.0, 2.0), NumericIs.AlmostEqualTo(.15384615384615384615e-2, 1e-14), "C5"); Assert.That(Fn.Beta(25.0, 5.0), NumericIs.AlmostEqualTo(.16841396151740979327e-5, 1e-13), "C6"); Assert.That(Fn.Beta(25.0, 10.0), NumericIs.AlmostEqualTo(.76261281522028757519e-9, 1e-13), "C7"); Assert.That(Fn.Beta(25.0, 100.0), NumericIs.AlmostEqualTo(.38445319996184968535e-27, 1e-13), "C8"); }