Skip to content

Commit 1132e59

Browse files
committed
[doc] Update documents for release (#186)
This PR updates release-facing metadata and documentation to reflect the v0.9.0 release (including the supported Mojo version), ensuring installation snippets and release notes match the new tag. **Changes:** - Bump workspace version in `pixi.toml` from 0.8.0 → 0.9.0. - Update documentation install snippets/tables/citation blocks to reference `decimo==0.9.0` and Mojo `0.26.2`. - Add a v0.9.0 release entry to the changelog and refresh README badges/version references.
1 parent 270194c commit 1132e59

File tree

6 files changed

+70
-21
lines changed

6 files changed

+70
-21
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
An arbitrary-precision integer and decimal library for [Mojo](https://www.modular.com/mojo), inspired by Python's `int` and `Decimal`.
44

55
[![Version](https://img.shields.io/github/v/tag/forfudan/decimo?label=version&color=blue)](https://github.com/forfudan/decimo/releases)
6+
[![Mojo](https://img.shields.io/badge/mojo-0.26.2-orange)](https://docs.modular.com/mojo/manual/)
67
[![pixi](https://img.shields.io/badge/pixi%20add-decimo-purple)](https://prefix.dev/channels/modular-community/packages/decimo)
7-
[![CI](https://img.shields.io/github/actions/workflow/status/forfudan/argmojo/run_tests.yaml?branch=main&label=tests)](https://github.com/forfudan/argmojo/actions/workflows/run_tests.yaml)
8-
[![Last Commit](https://img.shields.io/github/last-commit/forfudan/argmojo?color=red)](https://github.com/forfudan/argmojo/commits/main)
8+
[![CI](https://img.shields.io/github/actions/workflow/status/forfudan/decimo/run_tests.yaml?branch=main&label=tests)](https://github.com/forfudan/decimo/actions/workflows/run_tests.yaml)
99

1010
<!--
11-
[![Mojo](https://img.shields.io/badge/mojo-0.26.1-orange)](https://docs.modular.com/mojo/manual/)
12-
[![License](https://img.shields.io/github/license/forfudan/argmojo)](LICENSE)
13-
[![Stars](https://img.shields.io/github/stars/forfudan/argmojo?style=flat)](https://github.com/forfudan/argmojo/stargazers)
14-
[![Issues](https://img.shields.io/github/issues/forfudan/argmojo)](https://github.com/forfudan/argmojo/issues)
11+
[![License](https://img.shields.io/github/license/forfudan/decimo)](LICENSE)
12+
[![Stars](https://img.shields.io/github/stars/forfudan/decimo?style=flat)](https://github.com/forfudan/decimo/stargazers)
13+
[![Issues](https://img.shields.io/github/issues/forfudan/decimo)](https://github.com/forfudan/decimo/issues)
1514
![Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey)
15+
[![Last Commit](https://img.shields.io/github/last-commit/forfudan/decimo?color=red)](https://github.com/forfudan/decimo/commits/main)
1616
-->
1717

1818
<!--
@@ -63,7 +63,7 @@ Then, you can install Decimo using any of these methods:
6363
1. In the `mojoproject.toml` file of your project, add the following dependency:
6464

6565
```toml
66-
decimo = "==0.8.0"
66+
decimo = "==0.9.0"
6767
```
6868

6969
Then run `pixi install` to download and install the package.
@@ -83,6 +83,7 @@ The following table summarizes the package versions and their corresponding Mojo
8383
| `decimojo` | v0.6.0 | ==0.25.7 | pixi |
8484
| `decimojo` | v0.7.0 | ==0.26.1 | pixi |
8585
| `decimo` | v0.8.0 | ==0.26.1 | pixi |
86+
| `decimo` | v0.9.0 | ==0.26.2 | pixi |
8687

8788
## Quick start
8889

@@ -330,7 +331,7 @@ If you find Decimo useful, consider listing it in your citations.
330331
year = {2026},
331332
title = {Decimo: An arbitrary-precision integer and decimal library for Mojo},
332333
url = {https://github.com/forfudan/decimo},
333-
version = {0.8.0},
334+
version = {0.9.0},
334335
note = {Computer Software}
335336
}
336337
```

docs/changelog.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,53 @@
22

33
This is a list of changes for the Decimo package (formerly DeciMojo).
44

5+
## 20260323 (v0.9.0)
6+
7+
Decimo v0.9.0 updates the codebase to **Mojo v0.26.2** and marks the **"make it useful"** phase. This release introduces three major additions:
8+
9+
First, a full-featured **CLI arbitrary-precision calculator** (`decimo`), powered by Decimo's `BigDecimal`. It includes a complete tokenizer, a shunting-yard parser, and an RPN evaluator with working-precision guard digits, supporting built-in mathematical functions (`sqrt`, `cbrt`, `root`, `ln`, `log`, `log10`, `exp`, trigonometric functions, `abs`), constants (`pi`, `e`), and configurable output formatting (scientific/engineering notation, digit delimiters, rounding modes, and precision control).
10+
11+
Second, the `BigDecimal` API is significantly expanded with methods aligned to Python's `decimal.Decimal` and the IEEE 754 specification, including `as_tuple()`, `adjusted()`, `same_quantum()`, `scaleb()`, `fma()`, `copy_abs()`, `copy_negate()`, `copy_sign()`, `bit_count()`, `__float__()`, engineering notation, and digit-group delimiters for `to_string()`. The `ROUND_HALF_DOWN` rounding mode is added, bringing the total to seven.
12+
13+
Third, Decimo gains **Python bindings** via Mojo's `PythonModuleBuilder`, exposing `BigDecimal` as a native Python extension module (`_decimo.so`) with a Pythonic `Decimal` wrapper for seamless interoperability.
14+
15+
### ⭐️ New in v0.9.0
16+
17+
**CLI Calculator:**
18+
19+
1. Implement an arbitrary-precision CLI calculator with tokenizer, shunting-yard parser, and RPN evaluator, supporting arithmetic expressions with parentheses and operator precedence (PR #170).
20+
1. Add built-in functions (`sqrt`, `cbrt`, `root`, `ln`, `log`, `log10`, `exp`, `sin`, `cos`, `tan`, `cot`, `csc`, `abs`), constants (`pi`, `e`), and configurable output formatting (scientific/engineering notation, digit delimiter, padding, rounding mode) (PR #171).
21+
1. Improve CLI error handling with token location tracing and ANSI-coloured diagnostic output (PR #178).
22+
1. Use working precision (user precision + guard digits) for intermediate calculations to improve result accuracy (PR #182).
23+
24+
**BigDecimal:**
25+
26+
1. Add **engineering notation** (`to_eng_string()`) and **digit-group delimiters** (`to_string_with_separators()`) to `to_string()`, with optional line-width wrapping (PR #172).
27+
1. Add utility methods: `is_integer()`, `is_signed()`, `number_class()`, `logb()`, `normalize()`, `radix()` (PR #173).
28+
1. Implement `as_tuple()` returning `(sign, digits, exponent)`, matching Python's `Decimal.as_tuple()` (PR #174).
29+
1. Implement `adjusted()`, `copy_abs()`, `copy_negate()`, and `copy_sign()` aligned with Python's `decimal` API (PR #176).
30+
1. Implement `same_quantum()` and add the `ROUND_HALF_DOWN` rounding mode, bringing the total to seven (PR #177).
31+
1. Implement `scaleb()`, `fma()`, `bit_count()`, and `__float__()` (implements `FloatableRaising`) (PR #183).
32+
33+
**Python Bindings:**
34+
35+
1. Implement Python bindings via Mojo's `PythonModuleBuilder`, exposing `BigDecimal` as a native extension module `_decimo.so` with arithmetic, comparison, and string operations (PR #179).
36+
1. Restructure `python/` to a `src` layout with `pyproject.toml` for PyPI packaging (PR #180).
37+
38+
### 🦋 Changed in v0.9.0
39+
40+
1. Update the codebase to **Mojo v0.26.2**, adopting `byte=` slicing syntax, `out` parameter convention for constructors, and updated `String`/`StringSlice` APIs (PR #185).
41+
1. Merge `TOMLMojo` into Decimo as the sub-package `decimo.toml`, removing standalone packaging (PR #181).
42+
1. Rename `exponent()` to `adjusted()` for `BigDecimal` to align with Python's `decimal` module naming (PR #176).
43+
1. Change default precision of `BigDecimal` to **28** significant digits, matching Python's `decimal` module default.
44+
1. Remove deprecated free-function comparison aliases and legacy method names from `BigDecimal` (PR #173).
45+
1. Align `print_internal_representation()` output style across `BigInt`, `BigUInt`, `BigDecimal`, and `Decimal128` with dynamic column alignment (PR #169).
46+
47+
### 📚 Documentation and testing in v0.9.0
48+
49+
- Add comprehensive user manuals for the Decimo library and the CLI calculator (PR #184).
50+
- Add info badges to the README file.
51+
552
## 20260225 (v0.8.0)
653

754
> **Library renamed from `decimojo` to `decimo`.** The package name, import path, and all public references have been updated. GitHub repository will be renamed to `forfudan/decimo` (GitHub auto-redirects the old URL).

docs/readme_unreleased.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ An arbitrary-precision integer and decimal library for [Mojo](https://www.modula
44

55
[![Version](https://img.shields.io/github/v/tag/forfudan/decimo?label=version&color=blue)](https://github.com/forfudan/decimo/releases)
66
[![pixi](https://img.shields.io/badge/pixi%20add-decimo-purple)](https://prefix.dev/channels/modular-community/packages/decimo)
7-
[![CI](https://img.shields.io/github/actions/workflow/status/forfudan/argmojo/run_tests.yaml?branch=main&label=tests)](https://github.com/forfudan/argmojo/actions/workflows/run_tests.yaml)
8-
[![Last Commit](https://img.shields.io/github/last-commit/forfudan/argmojo?color=red)](https://github.com/forfudan/argmojo/commits/main)
7+
[![CI](https://img.shields.io/github/actions/workflow/status/forfudan/decimo/run_tests.yaml?branch=main&label=tests)](https://github.com/forfudan/decimo/actions/workflows/run_tests.yaml)
8+
[![Last Commit](https://img.shields.io/github/last-commit/forfudan/decimo?color=red)](https://github.com/forfudan/decimo/commits/main)
99

1010
<!--
11-
[![Mojo](https://img.shields.io/badge/mojo-0.26.1-orange)](https://docs.modular.com/mojo/manual/)
12-
[![License](https://img.shields.io/github/license/forfudan/argmojo)](LICENSE)
13-
[![Stars](https://img.shields.io/github/stars/forfudan/argmojo?style=flat)](https://github.com/forfudan/argmojo/stargazers)
14-
[![Issues](https://img.shields.io/github/issues/forfudan/argmojo)](https://github.com/forfudan/argmojo/issues)
11+
[![Mojo](https://img.shields.io/badge/mojo-0.26.2-orange)](https://docs.modular.com/mojo/manual/)
12+
[![License](https://img.shields.io/github/license/forfudan/decimo)](LICENSE)
13+
[![Stars](https://img.shields.io/github/stars/forfudan/decimo?style=flat)](https://github.com/forfudan/decimo/stargazers)
14+
[![Issues](https://img.shields.io/github/issues/forfudan/decimo)](https://github.com/forfudan/decimo/issues)
1515
![Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey)
1616
-->
1717

@@ -73,7 +73,7 @@ Then, you can install Decimo using any of these methods:
7373
1. In the `mojoproject.toml` file of your project, add the following dependency:
7474

7575
```toml
76-
decimo = "==0.8.0"
76+
decimo = "==0.9.0"
7777
```
7878

7979
Then run `pixi install` to download and install the package.
@@ -93,7 +93,7 @@ The following table summarizes the package versions and their corresponding Mojo
9393
| `decimojo` | v0.6.0 | ==0.25.7 | pixi |
9494
| `decimojo` | v0.7.0 | ==0.26.1 | pixi |
9595
| `decimo` | v0.8.0 | ==0.26.1 | pixi |
96-
| `decimo` | v0.9.0 | ==0.26.1 | pixi |
96+
| `decimo` | v0.9.0 | ==0.26.2 | pixi |
9797

9898
## Quick start
9999

@@ -375,7 +375,7 @@ If you find Decimo useful, consider listing it in your citations.
375375
year = {2026},
376376
title = {Decimo: An arbitrary-precision integer and decimal library for Mojo},
377377
url = {https://github.com/forfudan/decimo},
378-
version = {0.8.0},
378+
version = {0.9.0},
379379
note = {Computer Software}
380380
}
381381
```

docs/readme_zht.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ channels = ["https://conda.modular.com/max", "https://repo.prefix.dev/modular-co
5959
1. 在您項目的 `mojoproject.toml` 文件中,添加以下依賴:
6060

6161
```toml
62-
decimo = "==0.8.0"
62+
decimo = "==0.9.0"
6363
```
6464

6565
然後運行 `pixi install` 來下載並安裝包。
@@ -79,6 +79,7 @@ channels = ["https://conda.modular.com/max", "https://repo.prefix.dev/modular-co
7979
| `decimojo` | v0.6.0 | ==0.25.7 | pixi |
8080
| `decimojo` | v0.7.0 | ==0.26.1 | pixi |
8181
| `decimo` | v0.8.0 | ==0.26.1 | pixi |
82+
| `decimo` | v0.9.0 | ==0.26.2 | pixi |
8283

8384
## 快速開始
8485

@@ -326,7 +327,7 @@ fn main() raises:
326327
year = {2026},
327328
title = {Decimo: An arbitrary-precision integer and decimal library for Mojo},
328329
url = {https://github.com/forfudan/decimo},
329-
version = {0.8.0},
330+
version = {0.9.0},
330331
note = {Computer Software}
331332
}
332333
```

docs/user_manual.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pixi add decimo
114114
Or add it manually to `pixi.toml`:
115115

116116
```toml
117-
decimo = "==0.8.0"
117+
decimo = "==0.9.0"
118118
```
119119

120120
Then run `pixi install`.

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = "Apache-2.0"
66
name = "decimo"
77
platforms = ["osx-arm64", "linux-64"]
88
readme = "README.md"
9-
version = "0.8.0"
9+
version = "0.9.0"
1010

1111
[dependencies]
1212
# argmojo = ">=0.4.0" # CLI argument parsing for the Decimo calculator (TODO: waiting for argmojo 0.4.0 compatible with mojo 0.26.2)

0 commit comments

Comments
 (0)