public void ContinuedFractionToBigFractions()
        {
            var cont = new BigContinuedFraction(3, new BigInteger[] { 4, 12, 4 });

            var result = cont.GetBigFractions();
            Assert.IsNotNull(result);
            Assert.IsTrue(result.SequenceEqual(new[] { new BigFraction(3), new BigFraction(13, 4), new BigFraction(159, 49), new BigFraction(649, 200) }));
        }
        public void ContinuedFractionToBigFractions_Sqrt2_Alternate()
        {
            var cont = new BigContinuedFraction(1, Enumerable.Empty<BigInteger>(), new BigInteger[] { 2 });
            Assert.AreEqual("[1; (2)]", cont.ToString());

            var result = cont.GetBigFractions();
            Assert.IsNotNull(result);
            Assert.AreEqual(0.5, BigFraction.Log(result.ElementAt(200), 2.0));
        }
        public void ContinuedFractionToBigFractions_Sqrt2()
        {
            var cont = new BigContinuedFraction(1, CollectionUtilities.Repeat(new BigInteger(2)));
            Assert.AreEqual("[1; 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ...]", cont.ToString());

            var result = cont.GetBigFractions();
            Assert.IsNotNull(result);
            Assert.AreEqual(0.5, BigFraction.Log(result.ElementAt(200), 2.0));
        }