Esempio n. 1
0
        public string BinaryHandler(string element1, string element2, string function)
        {
            element1 = CalculateUtilities.StandardizedDisplay(element1);
            element2 = CalculateUtilities.StandardizedDisplay(element2);
            switch (function)
            {
            case "add":
                return(BinaryOperatorService.AddDecimal(element1, element2));

            case "subtract":
                return(BinaryOperatorService.SubtractDecimal(element1, element2));

            case "mutipilation":
                return(BinaryOperatorService.MutipilationDecimal(element1, element2));

            case "devision":
                return(BinaryOperatorService.DivisionDecimal(element1, element2, 20));

            default:
                throw new Exception();
            }
        }
 public static string InverseNumber(string number)
 {
     return(BinaryOperatorService.DivisionDecimal("1", number, 20));
 }