public static string AddDecimal(string decimal1, string decimal2)
        {
            int need1 = CalculateUtilities.ConvertDecimal(ref decimal1);
            int need2 = CalculateUtilities.ConvertDecimal(ref decimal2);
            int need  = 0;

            if (need1 > need2)
            {
                need = need1;
                int temp = need1 - need2;
                for (int i = 0; i < temp; i++)
                {
                    decimal2 += '0';
                }
            }
            else
            {
                need = need2;
                int temp = need2 - need1;
                for (int i = 0; i < temp; i++)
                {
                    decimal1 += '0';
                }
            }
            string result = AddInteger(decimal1, decimal2);

            if (need == 0)
            {
                return(result);
            }
            return(UnaryOperatorService.Devision10(result, need));
        }
        public static string MutipilationDecimal(string decimal1, string decimal2)
        {
            if (decimal2 == "0")
            {
                throw new DivideByZeroException();
            }
            int    need1  = CalculateUtilities.ConvertDecimal(ref decimal1);
            int    need2  = CalculateUtilities.ConvertDecimal(ref decimal2);
            int    need   = need1 + need2;
            string result = MutipilationInteger(decimal1, decimal2);

            if (need == 0)
            {
                return(result);
            }
            return(UnaryOperatorService.Devision10(result, need));
        }
        public static string SquareDecimal(string _decimal, int baseNumber, int accuracy)
        {
            int need = CalculateUtilities.ConvertDecimal(ref _decimal);
            int temp = need / baseNumber;
            int more = 0;

            if (need % baseNumber > 0)
            {
                more = need * (temp + 1) - need;
            }
            for (int i = 0; i < more; i++)
            {
                _decimal += '0';
            }
            string result = SquareInteger(_decimal, baseNumber);

            return(Devision10(result, temp));
        }
        public static string DivisionDecimal(string decimal1, string decimal2, int accuracy)
        {
            int need1 = CalculateUtilities.ConvertDecimal(ref decimal1);
            int need2 = CalculateUtilities.ConvertDecimal(ref decimal2);

            if (need1 > need2)
            {
                int temp = need1 - need2;
                for (int i = 0; i < temp; i++)
                {
                    decimal2 += '0';
                }
            }
            else
            {
                int temp = need2 - need1;
                for (int i = 0; i < temp; i++)
                {
                    decimal1 += '0';
                }
            }
            string remainder = "";
            string result    = DivisionInteger(decimal1, decimal2, out remainder);

            if (accuracy == 0 || remainder == "0")
            {
                return(result);
            }
            for (int i = 0; i < accuracy; i++)
            {
                remainder += '0';
            }
            string sTemp = DivisionInteger(remainder, decimal2);

            while (sTemp.Length < accuracy)
            {
                sTemp = '0' + sTemp;
            }
            return(result + '.' + sTemp);
        }
        public static string Devision10(string number, int n)
        {
            if (n < 0)
            {
                return(Mutipilation10(number, -n));
            }
            if (n == 0)
            {
                return(number);
            }
            int index  = number.IndexOf('.');
            int length = number.Length;

            if (index < 0)
            {
                index = length;
            }
            else
            {
                number = number.Remove(index, 1);
            }
            int _index = index - n;

            if (_index > 0)
            {
                number = number.Insert(_index, ".");
            }
            else if (_index <= 0)
            {
                _index = -_index;
                for (int i = 0; i < _index; i++)
                {
                    number = '0' + number;
                }
                number = "0." + number;
            }
            return(CalculateUtilities.StandardizedDisplay(number));
        }
        public static string Mutipilation10(string number, int n)
        {
            if (n < 0)
            {
                return(Devision10(number, -n));
            }
            if (n == 0)
            {
                return(number);
            }
            int index  = number.IndexOf('.');
            int length = number.Length;

            if (index < 0)
            {
                index = length;
            }
            else
            {
                number = number.Remove(index, 1);
            }
            int _index = index + n;

            if (_index < length)
            {
                number = number.Insert(_index, ".");
            }
            else if (_index > length)
            {
                int temp = _index - length;
                for (int i = 0; i < temp; i++)
                {
                    number += '0';
                }
            }
            return(CalculateUtilities.StandardizedDisplay(number));
        }