コード例 #1
0
 public void CanComputeNaturalLogarithm([Values(0.0, 0.0, -1.0, -111.1, 111.1)] double real, [Values(0.0, 1.0, 1.0, 111.1, -111.1)] double imag, [Values(double.NegativeInfinity, 0.0, 0.34657359027997264, 5.0570042869255571, 5.0570042869255571)] double expectedReal, [Values(0.0, 1.5707963267948966, 2.3561944901923448, 2.3561944901923448, -0.78539816339744828)] double expectedImag)
 {
     var value = new Complex(real, imag);
     var expected = new Complex(expectedReal, expectedImag);
     AssertHelpers.AlmostEqual(expected, value.NaturalLogarithm(), 15);
 }
コード例 #2
0
 public void CanComputeNaturalLogarithm(double real, double imag, double expectedReal, double expectedImag)
 {
     var value = new Complex(real, imag);
     var expected = new Complex(expectedReal, expectedImag);
     AssertHelpers.AlmostEqual(expected, value.NaturalLogarithm(), 15);
 }