public void DoubleDoubleLogGammaRecurrence()
 {
     foreach (DoubleDouble x in DoubleDoubleTest.GetRandomDoubleDoubles(1.0, 1.0E4, 8))
     {
         Assert.IsTrue(DoubleDoubleTest.IsNearlyEqual(
                           DoubleDouble.Log(x) + AdvancedDoubleDoubleMath.LogGamma(x),
                           AdvancedDoubleDoubleMath.LogGamma(x + DoubleDouble.One)
                           ));
     }
 }
        public void DoubleDoubleLogGammaAgreement()
        {
            foreach (DoubleDouble x in DoubleDoubleTest.GetRandomDoubleDoubles(1.0E-2, 1.0E3, 12))
            {
                DoubleDouble xLogGamma         = AdvancedDoubleDoubleMath.LogGamma(x);
                double       xLogGammaAsDouble = (double)xLogGamma;

                double xAsDouble         = (double)x;
                double xAsDoubleLogGamma = AdvancedMath.LogGamma(xAsDouble);

                Assert.IsTrue(TestUtilities.IsNearlyEqual(xLogGammaAsDouble, xAsDoubleLogGamma));
            }
        }
 public void DoubleDoubleLogGammanSpecialCases()
 {
     Assert.IsTrue(AdvancedDoubleDoubleMath.LogGamma(0.0) == DoubleDouble.PositiveInfinity);
     Assert.IsTrue(AdvancedDoubleDoubleMath.LogGamma(1.0) == DoubleDouble.Zero);
     Assert.IsTrue(AdvancedDoubleDoubleMath.LogGamma(2.0) == DoubleDouble.Zero);
 }