Beispiel #1
0
 public void InputFivePiDivSix()
 {
     cosineExp = new CosineExp(new Number(Constants.FivePiDivSix));
     dif       = new Difference((-Constants.SqrtThreeDivTwo), cosineExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #2
0
 public void InputFourPiDivSix()
 {
     cosineExp = new CosineExp(new Number(Constants.FourPiDivSix));
     dif       = new Difference(-Constants.OneDivTwo, cosineExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #3
0
 public void InputThreePiDivFour()
 {
     cosineExp = new CosineExp(new Number(Constants.ThreePiDivFour));
     dif       = new Difference(-Constants.SqrtTwoDivTwo, cosineExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #4
0
 public void InputZero()
 {
     cosineExp = new CosineExp(new Number(Constants.Zero));
     dif       = new Difference(Constants.One, cosineExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #5
0
 public void TwoSameNumbers()
 {
     addExp = new AdditionExp(new Number(120.0000001452), new Number(120.0000001452));
     dif    = new Difference(240.0000002904, addExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #6
0
 public void TwoSpecialFormatNumbers()
 {
     addExp = new AdditionExp(new Number(1.5e23), new Number(3.0e21));
     dif    = new Difference(1.53e23, addExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #7
0
 public void TwoDifferentNumbers()
 {
     addExp = new AdditionExp(new Number(-35216.012552), new Number(162.26671));
     dif    = new Difference(-35053.745842, addExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #8
0
 public void TwoOppositeNumbers()
 {
     addExp = new AdditionExp(new Number(734.13623), new Number(-734.13623));
     dif    = new Difference(0.0, addExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #9
0
 public void InputPiDivSix()
 {
     tanExp = new TangentExp(new Number(Constants.PiDivSix));
     dif    = new Difference(Constants.SqrtThreeDivThree, tanExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #10
0
 public void InputSevenPiDivFour()
 {
     tanExp = new TangentExp(new Number(Constants.SevenPiDivFour));
     dif    = new Difference(-Constants.One, tanExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
Beispiel #11
0
 public void InputPi()
 {
     tanExp = new TangentExp(new Number(Constants.Pi));
     dif    = new Difference(Constants.Zero, tanExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
 public void TwoSpecialFormatNumbers()
 {
     mulExp = new MultiplicationExp(new Number(14e21), new Number(3e-15));
     dif    = new Difference(4.2e7, mulExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
 public void TwoSameNumbers()
 {
     mulExp = new MultiplicationExp(new Number(124.126665435654356543), new Number(124.126665435654356543));
     dif    = new Difference(15407.4290721748699306017565, mulExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
 public void TwoOppositeNumbers()
 {
     mulExp = new MultiplicationExp(new Number(125235.1265436), new Number(0.00000798498015372));
     dif    = new Difference(1.0, mulExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }
 public void TwoDifferentNumbers()
 {
     mulExp = new MultiplicationExp(new Number(13553.2992), new Number(-2884.2155431));
     dif    = new Difference(-39090636.21292479552, mulExp.Evaluate());
     Assert.IsTrue(dif.IsAlmostSame());
 }