|
2 | 2 |
|
3 | 3 | This is a list of RELEASED changes for the DeciMojo Package. For the unreleased changes, please refer to **[changelog_unreleased](https://zhuyuhao.com/decimojo/docs/changelog_unreleased.html)**. |
4 | 4 |
|
| 5 | +## 15/04/2025 (v0.3.0) |
| 6 | + |
| 7 | +DeciMojo v0.3.0 introduces the arbitrary-precision `BigDecimal` type with comprehensive arithmetic operations, comparisons, and mathematical functions (`sqrt`, `root`, `log`, `exp`, `power`). A new `tomlmojo` package supports test refactoring. Improvements include refined `BigUInt` constructors, enhanced `scale_up_by_power_of_10()` functionality, and a critical multiplication bug fix. |
| 8 | + |
| 9 | +### ⭐️ New |
| 10 | + |
| 11 | +- Implement the `BigDecimal` type with unlimited precision arithmetic. |
| 12 | + - Implement basic arithmetic operations for `BigDecimal`: addition, subtraction, multiplication, division, and modulo. |
| 13 | + - Implement comparison operations for `BigDecimal`: less than, greater than, equal to, and not equal to. |
| 14 | + - Implement string representation and parsing for `BigDecimal`. |
| 15 | + - Implement mathematical operations for `BigDecimal`: `sqrt`, `nroot`, `log`, `exp`, and `power` functions. |
| 16 | + - Iimplement rounding functions. |
| 17 | +- Implement a simple TOML parser as package `tomlmojo` to refactor tests (PR #63). |
| 18 | + |
| 19 | +### 🦋 Changed |
| 20 | + |
| 21 | +- Refine the constructors of `BigUInt` (PR #64). |
| 22 | +- Improve the method `BigUInt.scale_up_by_power_of_10()` (PR #72). |
| 23 | + |
| 24 | +### 🛠️ Fixed |
| 25 | + |
| 26 | +- Fix a bug in `BigUInt` multiplication where the calcualtion of carry is mistakenly skipped if a word of x2 is zero (PR #70). |
| 27 | + |
5 | 28 | ## 01/04/2025 (v0.2.0) |
6 | 29 |
|
7 | 30 | Version 0.2.0 marks a significant expansion of DeciMojo with the introduction of `BigInt` and `BigUInt` types, providing unlimited precision integer arithmetic to complement the existing fixed-precision `Decimal` type. Core arithmetic functions for the `Decimal` type have been completely rewritten using Mojo 25.2's `UInt128`, delivering substantial performance improvements. This release also extends mathematical capabilities with advanced operations including logarithms, exponentials, square roots, and n-th roots for the `Decimal` type. The codebase has been reorganized into a more modular structure, enhancing maintainability and extensibility. With comprehensive test coverage, improved documentation in multiple languages, and optimized memory management, v0.2.0 represents a major advancement in both functionality and performance for numerical computing in Mojo. |
8 | 31 |
|
9 | | -DeciMojo division performance compared with Python's `decimal` module across versions: |
10 | | - |
11 | | -| Division Operation | v0.1.0 vs Python | v0.2.0 vs Python | Improvement | |
12 | | -| --------------------------------- | ---------------- | ---------------- | ----------- | |
13 | | -| Integer division (no remainder) | 0.15× (slower) | 485.88× faster | 3239× | |
14 | | -| Simple decimal division | 0.13× (slower) | 185.77× faster | 1429× | |
15 | | -| Division with repeating decimal | 0.04× (slower) | 12.46× faster | 311× | |
16 | | -| Division by one | 0.15× (slower) | 738.60× faster | 4924× | |
17 | | -| Division of zero | 1820.50× faster | 1866.50× faster | 1.03× | |
18 | | -| Division with negative numbers | 0.11× (slower) | 159.32× faster | 1448× | |
19 | | -| Division by very small number | 0.21× (slower) | 452.75× faster | 2156× | |
20 | | -| High precision division | 0.005× (slower) | 15.19× faster | 3038× | |
21 | | -| Division resulting in power of 10 | 0.21× (slower) | 619.00× faster | 2948× | |
22 | | -| Division of very large numbers | 0.06× (slower) | 582.86× faster | 9714× | |
23 | | - |
24 | | -_Note: Benchmarks performed on Darwin 24.3.0, arm processor with Python 3.12.9. The dramatic performance improvements in v0.2.0 come from completely rewriting the division algorithm using Mojo 25.2's UInt128 implementation. While v0.1.0 was generally slower than Python for division operations (except for division of zero), v0.2.0 achieves speedups of 12-1866× depending on the specific scenario._ |
25 | | - |
26 | 32 | ### ⭐️ New |
27 | 33 |
|
28 | 34 | - Add comprehensive `BigInt` and `BigUInt` implementation with unlimited precision integer arithmetic. |
|
0 commit comments