Skip to content

Fix/zero denominator parsing - #125

Merged
dnsl48 merged 2 commits into
masterfrom
fix/zero-denominator-parsing
Aug 9, 2026
Merged

Fix/zero denominator parsing#125
dnsl48 merged 2 commits into
masterfrom
fix/zero-denominator-parsing

Conversation

@dnsl48

@dnsl48 dnsl48 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

dnsl48 added 2 commits August 9, 2026 12:43
String parsing built num-rational ratios directly, so inputs such as 1/0 reached Ratio::new and panicked before FromStr could return.

Parsed values now use the same signed constructor as GenericFraction::new. Non-zero numerators become signed infinity, zero over zero becomes NaN, and ordinary fractions are still reduced. Regression tests cover Fraction, small generic values, Decimal, and the optional Unicode parser.
Parsing now follows the same rule as GenericFraction::new. The docs explain that non-zero values over zero become signed infinity and zero over zero becomes NaN, including Decimal and optional Unicode parsing.

The changelog records the fix for the next release.
@dnsl48
dnsl48 merged commit e855416 into master Aug 9, 2026
8 checks passed
@dnsl48
dnsl48 deleted the fix/zero-denominator-parsing branch August 9, 2026 00:57
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.

1 participant