[decimal] Implement exp() for BigDecimal
#74
Merged
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 updates to the
DeciMojoproject, focusing on enhancing the documentation, adding new functionality, and improving performance. The most important changes are summarized below:Documentation Enhancements:
README.md: Updated table of contents and added<!-- omit in toc -->comments to headings to improve navigation and readability. [1] [2] [3] [4]New Functionality:
src/decimojo/bigdecimal/bigdecimal.mojo: Addedexpmethod to theBigDecimalstruct to calculate the exponential of aBigDecimalnumber.src/decimojo/bigdecimal/rounding.mojo: Implementedround_to_precisionfunction for roundingBigDecimalnumbers to a specified precision.benches/bigdecimal/bench.mojo: Added benchmarks for the new exponential function. [1] [2] [3]Performance Improvements:
src/decimojo/biguint/arithmetics.mojo: Optimizedaddandadd_inplacefunctions forBigUIntby adding short-circuit cases and an optimized method for adding 1. [1] [2] [3]Miscellaneous:
docs/todo.md: Added new to-do items for future enhancements, including implementing a global precision variable forBigDecimaland adding aremove_trailing_zerosmethod forBigUInt.src/decimojo/bigdecimal/exponential.mojo: Added detailed implementation for theexpfunction and supporting Taylor series calculation. [1] [2] [3]These changes collectively improve the functionality, performance, and documentation of the
DeciMojolibrary.