Skip to content

Commit b989278

Browse files
authored
[doc] Add enhancement plan for Decimal128 type (#193)
This PR adds a detailed enhancement/audit plan for the `decimo.decimal128` module, capturing cross-language comparisons, identified correctness gaps, performance bottlenecks, and a prioritized execution order. **Changes:** - Introduces a comprehensive design/audit document for `Decimal128`, including a cross-language feature matrix. - Documents key architectural concerns (notably the 2^96−1 coefficient bound) and related performance implications. - Lists suspected correctness/performance issues and proposes a phased implementation plan.
1 parent 6e100e8 commit b989278

File tree

10 files changed

+949
-80
lines changed

10 files changed

+949
-80
lines changed

.github/workflows/run_tests.yaml

Lines changed: 278 additions & 72 deletions
Large diffs are not rendered by default.

docs/plans/decimal128_enhancement.md

Lines changed: 663 additions & 0 deletions
Large diffs are not rendered by default.

tests/test_bigdecimal.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33

44
for f in tests/bigdecimal/*.mojo; do
5-
pixi run mojo run -I src -D ASSERT=all --debug-level=line-tables "$f"
5+
pixi run mojo run -I src -D ASSERT=all --debug-level=full "$f"
66
done

tests/test_bigfloat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ trap cleanup EXIT
3737
for f in tests/bigfloat/*.mojo; do
3838
echo "=== $f ==="
3939
TMPBIN=$(mktemp /tmp/decimo_test_bigfloat_XXXXXX)
40-
pixi run mojo build -I src --debug-level=line-tables \
40+
pixi run mojo build -I src --debug-level=full \
4141
-Xlinker -L./"$WRAPPER_DIR" -Xlinker -ldecimo_gmp_wrapper \
4242
-o "$TMPBIN" "$f"
4343
DYLD_LIBRARY_PATH="./$WRAPPER_DIR" LD_LIBRARY_PATH="./$WRAPPER_DIR" "$TMPBIN"

tests/test_bigint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33

44
for f in tests/bigint/*.mojo; do
5-
pixi run mojo run -I src -D ASSERT=all --debug-level=line-tables "$f"
5+
pixi run mojo run -I src -D ASSERT=all --debug-level=full "$f"
66
done

tests/test_bigint10.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33

44
for f in tests/bigint10/*.mojo; do
5-
pixi run mojo run -I src -D ASSERT=all --debug-level=line-tables "$f"
5+
pixi run mojo run -I src -D ASSERT=all --debug-level=full "$f"
66
done

tests/test_biguint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33

44
for f in tests/biguint/*.mojo; do
5-
pixi run mojo run -I src -D ASSERT=all --debug-level=line-tables "$f"
5+
pixi run mojo run -I src -D ASSERT=all --debug-level=full "$f"
66
done

tests/test_cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e # Exit immediately if any command fails
33

44
# ── Unit tests ─────────────────────────────────────────────────────────────
55
for f in tests/cli/*.mojo; do
6-
pixi run mojo run -I src -I src/cli -D ASSERT=all --debug-level=line-tables "$f"
6+
pixi run mojo run -I src -I src/cli -D ASSERT=all --debug-level=full "$f"
77
done
88

99
# ── Integration tests (exercise the compiled binary) ───────────────────────

tests/test_decimal128.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33

44
for f in tests/decimal128/*.mojo; do
5-
pixi run mojo run -I src -D ASSERT=all --debug-level=line-tables "$f"
5+
pixi run mojo run -I src -D ASSERT=all --debug-level=full "$f"
66
done

tests/test_toml.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33

44
for f in tests/toml/*.mojo; do
5-
pixi run mojo run -I src -D ASSERT=all --debug-level=line-tables "$f"
5+
pixi run mojo run -I src -D ASSERT=all --debug-level=full "$f"
66
done

0 commit comments

Comments
 (0)