Skip to content

Clamp an unrepresentable balanced split into range - #67

Merged
timholy merged 1 commit into
mainfrom
teh/unrepresentable
Nov 8, 2026
Merged

timholy merged 1 commit into
mainfrom
teh/unrepresentable

Conversation

@timholy

@timholy timholy commented Nov 8, 2026

Copy link
Copy Markdown
Member

A product of many factors can carry a declared scale far below the smallest Float64, and the balanced split of its multiplication block then aims at an eta beyond floatmax. balanced_split threw there, although every member of the block's cover family is valid.

Where the clamped equalizing point exists but the pair (eta1, c12/eta1) would round to zero or infinity, balanced_split now moves eta1 into the window of clamp_representable: both entries normal and at most U = 2^(exponent(floatmax)/2). The headroom below floatmax is needed because each eta seeds a reverse sweep that adds to it; a seed at floatmax overflows at the first sum. Splits that are representable are returned unchanged, so covariance is lost only at blocks that have no representation. The three families with no ratio to read still throw, now with a message that says so.

Also add a promote_rule between BigFloat and ExpScaled: Base claims every Real for BigFloat, and the conflicting rules made promote_type recurse.

Assisted-by: Claude Opus 5.5 noreply@anthropic.com

A product of many factors can carry a declared scale far below the
smallest Float64, and the balanced split of its multiplication block
then aims at an eta beyond floatmax. balanced_split threw there,
although every member of the block's cover family is valid.

Where the clamped equalizing point exists but the pair (eta1,
c12/eta1) would round to zero or infinity, balanced_split now moves
eta1 into the window of clamp_representable: both entries normal and
at most U = 2^(exponent(floatmax)/2). The headroom below floatmax is
needed because each eta seeds a reverse sweep that adds to it; a seed
at floatmax overflows at the first sum. Splits that are representable
are returned unchanged, so covariance is lost only at blocks that
have no representation. The three families with no ratio to read
still throw, now with a message that says so.

Also add a promote_rule between BigFloat and ExpScaled: Base claims
every Real for BigFloat, and the conflicting rules made promote_type
recurse.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@timholy
timholy merged commit ea649ea into main Nov 8, 2026
9 checks passed
@timholy
timholy deleted the teh/unrepresentable branch November 8, 2026 11:41
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