コード例 #1
0
        public void Case9()
        {
            BigFraction bigA = new BigFraction(new BigInteger(decimal.MaxValue), new BigInteger(decimal.MinValue));
            var         a    = bigA.ToDecimal();

            Assert.Equal(-1m, a);
        }
コード例 #2
0
        public void Case5()
        {
            BigFraction bigA = new BigFraction(new BigInteger(decimal.MinValue) * 10, new BigInteger(decimal.MaxValue) * 20);
            var         a    = bigA.ToDecimal();

            Assert.Equal(-0.5m, a);
        }
コード例 #3
0
        public void Case6()
        {
            BigFraction bigA = new BigFraction(new BigInteger(decimal.MinValue) * 10, new BigInteger(decimal.MinValue) / 2);
            var         a    = bigA.ToDecimal();

            Assert.Equal(20m, a);
        }
コード例 #4
0
        public void Case3()
        {
            BigFraction bigA = new BigFraction(new BigInteger(decimal.MaxValue) * 100, new BigInteger(decimal.MaxValue) * 10);
            var         a    = bigA.ToDecimal();

            Assert.Equal(10m, a);
        }