Esempio n. 1
0
        public static void ReportDigitsBin(double v, double[] digits)
        {
            DComponents vDc = new DComponents(v);

            Debug.WriteLine($"The value is {vDc.ToBase2String(false)} (Decimal: {FmtDouble(v)}.");

            for (int i = 0; i < digits.Length; i++)
            {
                DComponents dc = new DComponents(digits[i]);
                Debug.WriteLine($"The {i} val is {dc.ToBase2String(false)}.");
            }
        }
Esempio n. 2
0
        public void ReportDigitsBin()
        {
            double      v   = GetDouble();
            DComponents vDc = new DComponents(v);

            Debug.WriteLine($"The value is {vDc.ToBase2String(false)} (Decimal: {FmtDouble(v)}).");

            Debug.WriteLine($"The decimal value is {ToDecimalString()}.");

            //string[] decComps = GetDecimalStrings();
            //for (int i = 0; i < decComps.Length; i++)
            //{
            //	Debug.WriteLine($"The decComp for {i} val is {decComps[i]}.");
            //}

            string[] digs = GetDigitsBin();
            for (int i = 0; i < digs.Length; i++)
            {
                Debug.WriteLine($"The {i} val is {digs[i]}, Decimal: {FmtDouble(_digs[i])}.");
            }
        }
Esempio n. 3
0
        public string GetDigitBin(int index)
        {
            DComponents dc = new DComponents(_digs[index]);

            return(dc.ToBase2String(false) + " Decimal: " + FmtDouble(_digs[index]));
        }