[decimal][integer] Implement comparison operators for BigDecimal + Improve BigUInt.scale_up_by_power_of_10()
#72
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 introduces a new benchmark for scaling up BigUInt values by powers of 10 and includes various improvements and additions to the
BigDecimalclass. The most important changes include adding a new benchmark file, updating the main benchmark script to include the new benchmark, and enhancing theBigDecimalclass with new methods.New Benchmark:
bench_bigdecimal_scale_up_by_power_of_10.mojoto benchmark thescale_up_by_power_of_10function forBigUIntvalues.Updates to Benchmark Script:
benches/bigdecimal/bench.mojoto include the new benchmark for scaling up by powers of 10. [1] [2] [3]Enhancements to
BigDecimalClass:BigDecforBigDecimalinsrc/decimojo/bigdecimal/bigdecimal.mojo.__iadd__,__isub__,__imul__,__itruediv__) and comparison methods (__gt__,__ge__,__lt__,__le__,__eq__,__ne__) to theBigDecimalclass.compare,compare_absolute,max,min) to theBigDecimalclass.Other Changes:
src/decimojo/__init__.mojoto include new aliases forBigDecimalandRoundingMode.