Skip to content

[decimal] Add engineering notation and delimiter to to_string of BigDecimal#172

Merged
forfudan merged 1 commit intoclifrom
eng
Feb 26, 2026
Merged

[decimal] Add engineering notation and delimiter to to_string of BigDecimal#172
forfudan merged 1 commit intoclifrom
eng

Conversation

@forfudan
Copy link
Copy Markdown
Owner

@forfudan forfudan commented Feb 26, 2026

Updates string-formatting APIs and CLI/docs to support newer BigDecimal to_string options while aligning BigInt’s string conversion naming with the rest of the numeric types.

Changes:

  • Rename BigInt’s to_decimal_string usage to to_string (including dunders and writer output).
  • Clarify CLI formatting flags as mutually exclusive (scientific vs engineering).
  • Update API roadmap documentation to reflect to_string(scientific=True) naming.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates string-formatting APIs and CLI/docs to support newer BigDecimal to_string options while aligning BigInt’s string conversion naming with the rest of the numeric types.

Changes:

  • Rename BigInt’s to_decimal_string usage to to_string (including dunders and writer output).
  • Clarify CLI formatting flags as mutually exclusive (scientific vs engineering).
  • Update API roadmap documentation to reflect to_string(scientific=True) naming.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/decimo/bigint/bigint.mojo Switches BigInt string conversion entrypoint from to_decimal_string to to_string across public outputs.
src/cli/main.mojo Adds a clarifying comment about mutually exclusive formatting flags.
docs/plans/api_roadmap.md Updates documentation to match the current to_string(scientific=True) parameter name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/decimo/bigint/bigint.mojo
Comment thread src/decimo/bigint/bigint.mojo
…name BigInt to_decimal_string to to_string

- Add force_plain, engineering, delimiter parameters to BigDecimal.to_string()
- Rename BigInt.to_decimal_string() to to_string(); keep deprecated alias
- Update tests to use the new to_string() name
- Clarify CLI formatting flags as mutually exclusive (scientific vs engineering)
- Update API roadmap documentation to reflect to_string(scientific=True) naming
@forfudan forfudan merged commit 0675627 into cli Feb 26, 2026
1 check passed
@forfudan forfudan deleted the eng branch February 26, 2026 22:55
forfudan added a commit that referenced this pull request Mar 23, 2026
…igDecimal` (#172)

Updates string-formatting APIs and CLI/docs to support newer BigDecimal
`to_string` options while aligning BigInt’s string conversion naming
with the rest of the numeric types.

**Changes:**
- Rename BigInt’s `to_decimal_string` usage to `to_string` (including
dunders and writer output).
- Clarify CLI formatting flags as mutually exclusive (scientific vs
engineering).
- Update API roadmap documentation to reflect
`to_string(scientific=True)` naming.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants