public void AddDecRoot(double num1, int root, int num2) { Real64 r1 = (Real64)num1; Real64 r2 = Real64.FromRadical(root, num2); Real64 radd = r1 + r2; Assert.Equal(Math.Pow(num2, 1.0 / root) + num1, radd.ToDouble(), 12); }
public void AddDecSRoot(int num) { Real64 r1 = Real64.PI; Real64 r2 = Real64.FromRadical(2, num); Real64 radd = r1 + r2; Assert.Equal(Math.PI + Math.Sqrt(num), radd.ToDouble(), 12); }
public void FromSqrt(int radical) { Real64 r1 = Real64.FromRadical(2, radical); Assert.False(r1.IsDecimal); var d = r1.ToDouble(); Assert.Equal(Math.Sqrt(radical), d, 12); }