Skip to content

Run the Jacobian weight sweeps in ExpScaled - #68

Merged
timholy merged 1 commit into
mainfrom
teh/weight-sweep-range
Nov 8, 2026
Merged

timholy merged 1 commit into
mainfrom
teh/weight-sweep-range

Conversation

@timholy

@timholy timholy commented Nov 8, 2026

Copy link
Copy Markdown
Member

The sweeps that balance a Jacobian cover are seeded with reciprocal weights, which spread as widely as the weights themselves. A node partway along a path could then leave Float64's range even where the weight the sweep returns lies inside it: on Brown's almost-linear system with one coordinate at 7e297, the reverse sweep's seed is multiplied by that coordinate before the remaining factors of 0.5 bring it back, and cover_jacobian threw although a representable cover exists.

The b-step (_sum_merge_b), the a-step (_marginal_weights) and the grouped sweep of cover_jacobian_hybrid now compute in ExpScaled{magtype(T)}, seeds included, and _toweights converts their results back. A weight outside the normal range of magtype(T) is an error naming the weight and whether it overflows or underflows; below that range the conversion would round away significant bits, and a weight rounded down need not cover. Interval tapes keep their upward-rounded sweeps in Upward{F}, and an overflow there is now reported as one. _check_cover_factors names the actual fault (underflow, overflow, NaN or a negative value) instead of always reporting underflow.

ExpScaled gains hypot, which the sign-averaged sweeps accumulate with; it rounds as F's hypot does in F's normal range.

The wider arithmetic costs about 1.65x end to end on a 2000-variable brownal.

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

The sweeps that balance a Jacobian cover are seeded with reciprocal
weights, which spread as widely as the weights themselves. A node
partway along a path could then leave Float64's range even where the
weight the sweep returns lies inside it: on Brown's almost-linear
system with one coordinate at 7e297, the reverse sweep's seed is
multiplied by that coordinate before the remaining factors of 0.5
bring it back, and cover_jacobian threw although a representable
cover exists.

The b-step (_sum_merge_b), the a-step (_marginal_weights) and the
grouped sweep of cover_jacobian_hybrid now compute in
ExpScaled{magtype(T)}, seeds included, and _toweights converts their
results back. A weight outside the normal range of magtype(T) is an
error naming the weight and whether it overflows or underflows;
below that range the conversion would round away significant bits,
and a weight rounded down need not cover. Interval tapes keep their
upward-rounded sweeps in Upward{F}, and an overflow there is now
reported as one. _check_cover_factors names the actual fault
(underflow, overflow, NaN or a negative value) instead of always
reporting underflow.

ExpScaled gains hypot, which the sign-averaged sweeps accumulate
with; it rounds as F's hypot does in F's normal range.

The wider arithmetic costs about 1.65x end to end on a 2000-variable
brownal.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@timholy
timholy merged commit 393350d into main Nov 8, 2026
9 checks passed
@timholy
timholy deleted the teh/weight-sweep-range branch November 8, 2026 13:17
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