Exemplo n.º 1
0
        public void TestAtanh()
        {
            double d = 0;

            d = MathX.Atanh(0);
            AssertEquals("atanh 0", d, 0);

            d = MathX.Atanh(1);
            AssertEquals("atanh 1 ", Double.PositiveInfinity, d);

            d = MathX.Atanh(-1);
            AssertEquals("atanh -1 ", Double.NegativeInfinity, d);

            d = MathX.Atanh(-100);
            AssertEquals("atanh -100 ", Double.NaN, d);

            d = MathX.Atanh(100);
            AssertEquals("atanh 100 ", Double.NaN, d);

            d = MathX.Atanh(200000);
            AssertEquals("atanh 200000", Double.NaN, d);

            d = MathX.Atanh(-200000);
            AssertEquals("atanh -200000 ", Double.NaN, d);

            d = MathX.Atanh(0.1);
            AssertEquals("atanh 0.1", 0.100335348, d);

            d = MathX.Atanh(-0.1);
            AssertEquals("atanh -0.1 ", -0.100335348, d);
        }
Exemplo n.º 2
0
 public override double Evaluate(double d)
 {
     return(MathX.Atanh(d));
 }