[decimal] Implement multiply() for BigDecimal type
#69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to enhance the
BigDecimalandBigIntfunctionalities, improve the arithmetic operations, and update the documentation. The main changes include the addition of themultiplyfunction forBigDecimal, improvements to theaddandsubtractfunctions, and updates to the string representation methods.Enhancements to
BigDecimal:multiplyfunction to perform multiplication ofBigDecimalnumbers. [1] [2]addandsubtractfunctions to handle zero operands more efficiently and ensure precise results. [1] [2] [3] [4]extend_precisionmethod to increase the precision ofBigDecimalnumbers by adding trailing zeros.to_stringmethod to support line width limits for better readability. [1] [2]internal_representationmethod to print the internal representation details ofBigDecimalnumbers.Enhancements to
BigInt:to_stringmethod to support line width limits for better readability. [1] [2]MAX_OF_WORDandBASE_OF_WORDand replaced their usage with direct values. [1] [2]Documentation updates:
README.mdto reflect the current state of theBigDecimalimplementation and added a table summarizing the core types and their internal representations.Benchmark updates:
bench_bigdecimal_multiplybenchmark to thebenches/bigdecimal/bench.mojofile to include multiplication benchmarks. [1] [2] [3]