Refactoring bcmath library source