R/MRatCalcpowered by RiX

RiX walkthrough 14 i

Inspect an exact repeating expansion

Compute bounded positional digits and a rational's exact repeating period.

Load the plugin and inspect the familiar repeating decimal for one seventh:

Runnable RiX

The same operation remains safe for a denominator with a large period. A small budget returns an explicit partial result:

Runnable RiX

Formatting can use any collision-free single-glyph alphabet. This base-62 policy keeps exact digit generation separate from its display glyphs:

Runnable RiX

Grouping works from the radix point outward. The shorthand groupSize applies to both sides; either side can be overridden independently:

Runnable RiX

Both bounded analyses expose portable work diagnostics:

Runnable RiX

Pull exact digits lazily

DigitStream uses RiX's restartable cached lazy-sequence protocol. With no count, a rational's fractional expansion is unbounded: a repeat continues to repeat, while a terminating expansion continues with exact zeros.

Runnable RiX

Use a finite window when materialization is intended. start is one-based and count bounds the number of lazily produced digits.

Runnable RiX

A fresh copy keeps the current exact remainder and cached prefix but advances independently. A deep copy restarts the declared stream.

Runnable RiX