You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,19 @@
1
-
# DeciMojo
1
+
# DeciMojo<!-- omit in toc -->
2
2
3
3
A comprehensive decimal and integer mathematics library for [Mojo](https://www.modular.com/mojo).
4
4
5
5
**[中文·漢字»](https://zhuyuhao.com/decimojo/docs/readme_zht.html)** | **[Repository on GitHub»](https://github.com/forfudan/decimojo)** | **[Changelog](https://zhuyuhao.com/decimojo/docs/changelog.html)**
6
6
7
+
-[Overview](#overview)
8
+
-[Installation](#installation)
9
+
-[Quick start](#quick-start)
10
+
-[Objective](#objective)
11
+
-[Nomenclature](#nomenclature)
12
+
-[Status](#status)
13
+
-[Tests and benches](#tests-and-benches)
14
+
-[Citation](#citation)
15
+
-[License](#license)
16
+
7
17
## Overview
8
18
9
19
DeciMojo provides a comprehensive decimal and integer mathematics library for Mojo, delivering exact calculations for financial modeling, scientific computing, and applications where floating-point approximation errors are unacceptable. Beyond basic arithmetic, the library includes advanced mathematical functions with guaranteed precision.
@@ -168,15 +178,15 @@ The name ultimately emphasizes our mission: bringing precise, reliable decimal c
168
178
169
179
Rome wasn't built in a day. DeciMojo is currently under active development. For the 128-bit `Decimal` type, it has successfully progressed through the **"make it work"** phase and is now well into the **"make it right"** phase with many optimizations already in place. Bug reports and feature requests are welcome! If you encounter issues, please [file them here](https://github.com/forfudan/decimojo/issues).
170
180
171
-
### Make it Work ✅ (COMPLETED)
181
+
### Make it Work ✅ (COMPLETED)<!-- omit in toc -->
172
182
173
183
- Core decimal implementation with a robust 128-bit representation (96-bit coefficient + 32-bit flags)
- Type conversions to/from various formats (String, Int, Float64, etc.)
176
186
- Proper representation of special values (NaN, Infinity)
177
187
- Full suite of comparison operators with correct decimal semantics
178
188
179
-
### Make it Right 🔄 (MOSTLY COMPLETED)
189
+
### Make it Right 🔄 (MOSTLY COMPLETED)<!-- omit in toc -->
180
190
181
191
- Reorganized codebase with modular structure (decimal, arithmetics, comparison, exponential).
182
192
- Edge case handling for all operations (division by zero, zero to negative power).
@@ -186,7 +196,7 @@ Rome wasn't built in a day. DeciMojo is currently under active development. For
186
196
- Proper implementation of traits (Absable, Comparable, Floatable, Roundable, etc).
187
197
-**BigInt and BigUInt** implementations with complete arithmetic operations, proper division semantics (floor and truncate), and support for arbitrary-precision calculations.
188
198
189
-
### Make it Fast ⚡ (SIGNIFICANT PROGRESS)
199
+
### Make it Fast ⚡ (SIGNIFICANT PROGRESS)<!-- omit in toc -->
190
200
191
201
DeciMojo delivers exceptional performance compared to Python's `decimal` module while maintaining precise calculations. This performance difference stems from fundamental design choices:
Regular benchmarks against Python's `decimal` module are available in the `bench/` folder, documenting both the performance advantages and the few specific operations where different approaches are needed.
204
214
205
-
### Future Extensions 🚀 (PLANNED)
215
+
### Future Extensions 🚀 (PLANNED)<!-- omit in toc -->
206
216
207
217
-**BigDecimal**: 🔄 **IN PROGRESS** - Arbitrary-precision decimal type with configurable precision[^arbitrary].
208
218
-**BigComplex**: 📝 **PLANNED** - Arbitrary-precision complex number type built on BigDecimal.
0 commit comments