public void DoubleDoubleErrorFunctionReflection()
 {
     foreach (DoubleDouble x in DoubleDoubleTest.GetRandomDoubleDoubles(1.0E-4, 1.0E4, 8))
     {
         DoubleDouble xErf = AdvancedDoubleDoubleMath.Erf(x);
         Assert.IsTrue(-AdvancedDoubleDoubleMath.Erf(-x) == AdvancedDoubleDoubleMath.Erf(x));
     }
 }
 public void DoubleDoubleErrorFunctionComplementiarity()
 {
     foreach (DoubleDouble x in DoubleDoubleTest.GetRandomDoubleDoubles(1.0E-2, 1.0E2, 8))
     {
         DoubleDouble xErf  = AdvancedDoubleDoubleMath.Erf(x);
         DoubleDouble xErfc = AdvancedDoubleDoubleMath.Erfc(x);
         Assert.IsTrue(DoubleDoubleTest.IsNearlyEqual(xErf + xErfc, DoubleDouble.One));
     }
 }
        public void DoubleDoubleErrorFunctionAgreement()
        {
            foreach (DoubleDouble x in DoubleDoubleTest.GetRandomDoubleDoubles(1.0E-2, 1.0E2, 8))
            {
                DoubleDouble xErf         = AdvancedDoubleDoubleMath.Erf(x);
                double       xErfAsDouble = (double)xErf;

                double xAsDouble    = (double)x;
                double xAsDoubleErf = AdvancedMath.Erf(xAsDouble);

                Assert.IsTrue(TestUtilities.IsNearlyEqual(xErfAsDouble, xAsDoubleErf));

                DoubleDouble xErfc = AdvancedDoubleDoubleMath.Erfc(x);
                Assert.IsTrue(DoubleDoubleTest.IsNearlyEqual(xErf + xErfc, DoubleDouble.One));
            }
        }
 public void DoubleDoubleErrorFunctionSpecialCases()
 {
     Assert.IsTrue(AdvancedDoubleDoubleMath.Erf(DoubleDouble.Zero) == DoubleDouble.Zero);
     Assert.IsTrue(AdvancedDoubleDoubleMath.Erfc(DoubleDouble.Zero) == DoubleDouble.One);
 }