Skip to content

docs: explain float range limits in the API - #206

Closed
MbappeWU wants to merge 1 commit into
SethMMorton:mainfrom
MbappeWU:codex/docs-float-range-limits
Closed

MbappeWU wants to merge 1 commit into
SethMMorton:mainfrom
MbappeWU:codex/docs-float-range-limits

Conversation

@MbappeWU

@MbappeWU MbappeWU commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

ns.FLOAT and ns.REAL parse numeric components as Python floats. Two finite strings such as 1e500 and 1e400 can produce the same infinity key, so their magnitudes are no longer distinguished.

Add an API note with the overflow example, a link to sys.float_info, and a Decimal example scoped to whole numeric strings. This follows the documentation option proposed in #192. Runtime parsing and sorting are unchanged.

Validation:

  • Original tox -e docs on clean main and the changed checkout: successful builds, zero warnings.
  • Literal example assertions: passed with the pure Python fallback and with fastnumbers 5.2.0.
  • Generated HTML: confirmed the note and links to sys.float_info and decimal.Decimal.
  • git diff --check: passed.
  • At submission, upstream Tests and Code Quality require maintainer approval; no CI jobs have run.

AI assistance: prepared with OpenAI Codex and checked by a separate AI review. These checks do not claim human review.

@MbappeWU
MbappeWU marked this pull request as ready for review October 5, 2026 19:26
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.80%. Comparing base (380f5a7) to head (3f4b32a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #206   +/-   ##
=======================================
  Coverage   97.80%   97.80%           
=======================================
  Files          10       10           
  Lines         637      637           
=======================================
  Hits          623      623           
  Misses         14       14           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SethMMorton

Copy link
Copy Markdown
Owner

Thank you for the PR, but I plan to actually update the code to handle this case.

@SethMMorton SethMMorton closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants