Repository navigation
Compute the Gauss–Legendre angles and weights in θ - #433
jasonmcewen wants to merge 2 commits into
Conversation
s2_samples.thetas took the GL angles as arccos of numpy's leggauss roots, and quad_weights_gl_theta_only (with its JAX copy) found its own nodes by Newton's method in x, stopping at |dx| <= 1e-14 and taking the derivative at the previous iterate. Near the poles, arccos amplifies the rounding of x = cos(theta) by 1/sin(theta). Against binary128, the polar angles were off by 2.2e-15 rad (1926 ulp) at L = 512 and 6.2e-14 rad at L = 4096, and the polar weights by 2.2e-13 and up to 2e-10. With the pole fix of #430, these angles account for the excess GL synthesis error near the poles in a test at L = 512, where it was about 7 times its mid-latitude value. Compute both from one routine, in a new private module, sampling/_gauss_legendre.py. It uses Newton's method in theta, with P_L evaluated through the differences P_l - P_{l-1} in s = sin^2(theta/2), so that no rounded x is formed, and one last step in double-double arithmetic, rounded once. The weights 2 / (dP_L/dtheta)^2 come from the same double-double P_L at the last iterate, carried to the final node by Legendre's equation to second order and rounded once; the middle weight of an odd L is computed at s = 1/2 exactly, on the same path. The JAX weights reuse them. The result is cached per L, after operator.index, so zero-dimensional integer arrays still work. L < 1 still raises ValueError. Against binary128, every angle and every weight is correctly rounded for every node of every L from 1 to 4096 and of L = 8191 to 8193, 16383 and 16384; this is observed, not proved. A first call takes 19 ms at L = 512 and 0.29 s at 4096, against 19 ms and 6.8 s for main's angles and weights, but a first call for the weights alone is slower than on main (0.29 s against 47 ms at 4096). On top of #430, the polar to mid-latitude ratio of the GL synthesis error at L = 512 falls from 6.9 to 0.8. New tests check the angles and weights exactly against 40-digit mpmath values (all nodes up to L = 64, and polar and equatorial nodes at L = 1001 and 2049), and a zero-dimensional L; 19 of the 22 reference cases fail on main. The full suite passes with JAX on the CPU (5398 passed, 1535 skipped: unsupported combinations and 10 GPU-only tests). Harness: Claude Code 2.1.312 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SoYPKjWF4i5SQv5WmzhHgC
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #433 +/- ##
==========================================
+ Coverage 96.98% 97.00% +0.02%
==========================================
Files 36 37 +1
Lines 3577 3640 +63
==========================================
+ Hits 3469 3531 +62
- Misses 108 109 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| @@ -1,5 +1,7 @@ | |||
| import numpy as np | |||
|
|
|||
| from s2fft.sampling import _gauss_legendre | |||
There was a problem hiding this comment.
add comment here linking https://github.com/astro-informatics/s2fft/blob/develop/design/DESIGN.md
There was a problem hiding this comment.
| from s2fft.sampling import _gauss_legendre | |
| # To be folded into class during refactoring for s2fft v1.6, see | |
| # https://github.com/astro-informatics/s2fft/blob/develop/design/DESIGN.md | |
| from s2fft.sampling import _gauss_legendre |
| :math:`s = \sin^2(\theta/2)`, so that no rounded :math:`x = 1 - 2s` is formed. A last | ||
| Newton step and the weights :math:`2/(dP_L/d\theta)^2` at the final nodes are evaluated in | ||
| double-double arithmetic and rounded once to float64. In every case tested, the angles and | ||
| the weights are then correctly rounded. |
There was a problem hiding this comment.
Docstring of the float64 version.
| :math:`s = \sin^2(\theta/2)`, so that no rounded :math:`x = 1 - 2s` is formed. A last | |
| Newton step and the weights :math:`2/(dP_L/d\theta)^2` at the final nodes are evaluated in | |
| double-double arithmetic and rounded once to float64. In every case tested, the angles and | |
| the weights are then correctly rounded. | |
| :math:`s = \sin^2(\theta/2)`, so that no rounded :math:`x = 1 - 2s` is formed. The | |
| weights are :math:`2/(dP_L/d\theta)^2` at the final nodes, in float64. |
| from fractions import Fraction | ||
| from functools import lru_cache | ||
| from math import factorial |
There was a problem hiding this comment.
Fraction and factorial only build the double-double constants.
| from fractions import Fraction | |
| from functools import lru_cache | |
| from math import factorial | |
| from functools import lru_cache |
|
|
||
| # Double-double arithmetic (Dekker 1971): a value is the unevaluated sum hi + lo. | ||
| _SPLIT = 134217729.0 # 2**27 + 1 | ||
|
|
||
|
|
||
| def _two_sum(a, b): | ||
| s = a + b | ||
| bb = s - a | ||
| return s, (a - (s - bb)) + (b - bb) | ||
|
|
||
|
|
||
| def _fast_two_sum(a, b): | ||
| s = a + b | ||
| return s, b - (s - a) | ||
|
|
||
|
|
||
| def _two_prod(a, b): | ||
| p = a * b | ||
| a_hi = _SPLIT * a | ||
| a_hi = a_hi - (a_hi - a) | ||
| b_hi = _SPLIT * b | ||
| b_hi = b_hi - (b_hi - b) | ||
| a_lo, b_lo = a - a_hi, b - b_hi | ||
| return p, ((a_hi * b_hi - p) + a_hi * b_lo + a_lo * b_hi) + a_lo * b_lo | ||
|
|
||
|
|
||
| def _dd_add(x, y): | ||
| s, e = _two_sum(x[0], y[0]) | ||
| return _fast_two_sum(s, e + (x[1] + y[1])) | ||
|
|
||
|
|
||
| def _dd_mul(x, y): | ||
| p, e = _two_prod(x[0], y[0]) | ||
| return _fast_two_sum(p, e + (x[0] * y[1] + x[1] * y[0])) | ||
|
|
||
|
|
||
| def _dd_scale(x, c): | ||
| p, e = _two_prod(x[0], c) | ||
| return _fast_two_sum(p, e + x[1] * c) | ||
|
|
||
|
|
||
| def _dd_div(x, c): | ||
| q = x[0] / c | ||
| p, e = _two_prod(q, c) | ||
| return _fast_two_sum(q, ((x[0] - p) - e + x[1]) / c) | ||
|
|
||
|
|
||
| def _dd_div_dd(x, y): | ||
| q = x[0] / y[0] | ||
| r = _dd_add(x, _dd_scale(y, -q)) | ||
| return _fast_two_sum(q, r[0] / y[0]) | ||
|
|
||
|
|
||
| def _dd_const(value: Fraction) -> tuple[float, float]: | ||
| hi = float(value) | ||
| return hi, float(value - Fraction(hi)) | ||
|
|
||
|
|
||
| _PI = _dd_const(Fraction("3.14159265358979323846264338327950288419716939937510582097")) | ||
| # Taylor coefficients (-1)^n / (2n + 1)! of sin t / t, enough for |t| <= pi/4 | ||
| _SIN_COEFFS = [_dd_const(Fraction((-1) ** n, factorial(2 * n + 1))) for n in range(18)] | ||
|
|
||
|
|
||
| def _dd_sin(t: np.ndarray) -> tuple[np.ndarray, np.ndarray]: | ||
| """sin(t) in double-double, for float64 t with |t| <= pi/4.""" | ||
| t2 = _two_prod(t, t) | ||
| acc = (np.full_like(t, _SIN_COEFFS[-1][0]), np.full_like(t, _SIN_COEFFS[-1][1])) | ||
| for c_hi, c_lo in reversed(_SIN_COEFFS[:-1]): | ||
| acc = _dd_add(_dd_mul(acc, t2), (np.full_like(t, c_hi), np.full_like(t, c_lo))) | ||
| return _dd_scale(acc, t) |
There was a problem hiding this comment.
Plain float64: the double-double primitives (_two_sum, _fast_two_sum, _two_prod, _dd_*), the constants _SPLIT, _PI, _SIN_COEFFS and _dd_sin are then unused.
| # Double-double arithmetic (Dekker 1971): a value is the unevaluated sum hi + lo. | |
| _SPLIT = 134217729.0 # 2**27 + 1 | |
| def _two_sum(a, b): | |
| s = a + b | |
| bb = s - a | |
| return s, (a - (s - bb)) + (b - bb) | |
| def _fast_two_sum(a, b): | |
| s = a + b | |
| return s, b - (s - a) | |
| def _two_prod(a, b): | |
| p = a * b | |
| a_hi = _SPLIT * a | |
| a_hi = a_hi - (a_hi - a) | |
| b_hi = _SPLIT * b | |
| b_hi = b_hi - (b_hi - b) | |
| a_lo, b_lo = a - a_hi, b - b_hi | |
| return p, ((a_hi * b_hi - p) + a_hi * b_lo + a_lo * b_hi) + a_lo * b_lo | |
| def _dd_add(x, y): | |
| s, e = _two_sum(x[0], y[0]) | |
| return _fast_two_sum(s, e + (x[1] + y[1])) | |
| def _dd_mul(x, y): | |
| p, e = _two_prod(x[0], y[0]) | |
| return _fast_two_sum(p, e + (x[0] * y[1] + x[1] * y[0])) | |
| def _dd_scale(x, c): | |
| p, e = _two_prod(x[0], c) | |
| return _fast_two_sum(p, e + x[1] * c) | |
| def _dd_div(x, c): | |
| q = x[0] / c | |
| p, e = _two_prod(q, c) | |
| return _fast_two_sum(q, ((x[0] - p) - e + x[1]) / c) | |
| def _dd_div_dd(x, y): | |
| q = x[0] / y[0] | |
| r = _dd_add(x, _dd_scale(y, -q)) | |
| return _fast_two_sum(q, r[0] / y[0]) | |
| def _dd_const(value: Fraction) -> tuple[float, float]: | |
| hi = float(value) | |
| return hi, float(value - Fraction(hi)) | |
| _PI = _dd_const(Fraction("3.14159265358979323846264338327950288419716939937510582097")) | |
| # Taylor coefficients (-1)^n / (2n + 1)! of sin t / t, enough for |t| <= pi/4 | |
| _SIN_COEFFS = [_dd_const(Fraction((-1) ** n, factorial(2 * n + 1))) for n in range(18)] | |
| def _dd_sin(t: np.ndarray) -> tuple[np.ndarray, np.ndarray]: | |
| """sin(t) in double-double, for float64 t with |t| <= pi/4.""" | |
| t2 = _two_prod(t, t) | |
| acc = (np.full_like(t, _SIN_COEFFS[-1][0]), np.full_like(t, _SIN_COEFFS[-1][1])) | |
| for c_hi, c_lo in reversed(_SIN_COEFFS[:-1]): | |
| acc = _dd_add(_dd_mul(acc, t2), (np.full_like(t, c_hi), np.full_like(t, c_lo))) | |
| return _dd_scale(acc, t) |
|
|
||
|
|
||
| def _legendre_by_differences_dd(s, L: int): | ||
| """:math:`P_L` and :math:`D_L` as in :func:`_legendre_by_differences`, in double-double.""" | ||
| two_s = (2 * s[0], 2 * s[1]) | ||
| neg_two_s = (-two_s[0], -two_s[1]) | ||
| p = _dd_add((np.ones_like(s[0]), np.zeros_like(s[0])), neg_two_s) | ||
| d = neg_two_s | ||
| for ell in range(1, L): | ||
| b = _dd_scale(_dd_mul(two_s, p), float(2 * ell + 1)) | ||
| d = _dd_div(_dd_add(_dd_scale(d, float(ell)), (-b[0], -b[1])), float(ell + 1)) | ||
| p = _dd_add(p, d) | ||
| return p, d | ||
|
|
||
|
|
||
| def _weights_dd(s, p, d, delta, L: int) -> np.ndarray: | ||
| r""" | ||
| The weights :math:`2/(dP_L/d\theta)^2` at :math:`\theta + \delta`, rounded once to | ||
| float64, from :math:`s`, :math:`P_L` and :math:`D_L` at :math:`\theta` in double-double. | ||
|
|
||
| At a zero of :math:`P_L`, Legendre's equation gives | ||
| :math:`d^2P_L/d\theta^2 = -\cot\theta \, dP_L/d\theta`, and differentiating it once more | ||
| gives the third derivative, so the small step :math:`\delta` to the zero multiplies the | ||
| weight by :math:`1 + 2\delta\cot\theta + (\cot^2\theta - 1 - L(L+1))\delta^2`, to second | ||
| order. | ||
| """ | ||
| one = (np.ones_like(s[0]), np.zeros_like(s[0])) | ||
| # sin(theta) dP_L/dtheta = L (D_L - 2s P_L), and 2 sin^2(theta) = 8s (1 - s) | ||
| sin_dpdt = _dd_scale(_dd_add(d, _dd_scale(_dd_mul(s, p), -2.0)), float(L)) | ||
| two_sin2 = _dd_scale(_dd_mul(s, _dd_add(one, (-s[0], -s[1]))), 8.0) | ||
| w = _dd_div_dd(two_sin2, _dd_mul(sin_dpdt, sin_dpdt)) | ||
| cot = (1 - 2 * s[0]) / (2 * np.sqrt(s[0] * (1 - s[0]))) | ||
| scale = 2 * delta * cot + (cot * cot - 1 - L * (L + 1)) * delta * delta | ||
| w = _dd_add(w, (scale * w[0], np.zeros_like(w[0]))) | ||
| return w[0] + w[1] |
There was a problem hiding this comment.
_legendre_by_differences_dd and _weights_dd are then unused.
| def _legendre_by_differences_dd(s, L: int): | |
| """:math:`P_L` and :math:`D_L` as in :func:`_legendre_by_differences`, in double-double.""" | |
| two_s = (2 * s[0], 2 * s[1]) | |
| neg_two_s = (-two_s[0], -two_s[1]) | |
| p = _dd_add((np.ones_like(s[0]), np.zeros_like(s[0])), neg_two_s) | |
| d = neg_two_s | |
| for ell in range(1, L): | |
| b = _dd_scale(_dd_mul(two_s, p), float(2 * ell + 1)) | |
| d = _dd_div(_dd_add(_dd_scale(d, float(ell)), (-b[0], -b[1])), float(ell + 1)) | |
| p = _dd_add(p, d) | |
| return p, d | |
| def _weights_dd(s, p, d, delta, L: int) -> np.ndarray: | |
| r""" | |
| The weights :math:`2/(dP_L/d\theta)^2` at :math:`\theta + \delta`, rounded once to | |
| float64, from :math:`s`, :math:`P_L` and :math:`D_L` at :math:`\theta` in double-double. | |
| At a zero of :math:`P_L`, Legendre's equation gives | |
| :math:`d^2P_L/d\theta^2 = -\cot\theta \, dP_L/d\theta`, and differentiating it once more | |
| gives the third derivative, so the small step :math:`\delta` to the zero multiplies the | |
| weight by :math:`1 + 2\delta\cot\theta + (\cot^2\theta - 1 - L(L+1))\delta^2`, to second | |
| order. | |
| """ | |
| one = (np.ones_like(s[0]), np.zeros_like(s[0])) | |
| # sin(theta) dP_L/dtheta = L (D_L - 2s P_L), and 2 sin^2(theta) = 8s (1 - s) | |
| sin_dpdt = _dd_scale(_dd_add(d, _dd_scale(_dd_mul(s, p), -2.0)), float(L)) | |
| two_sin2 = _dd_scale(_dd_mul(s, _dd_add(one, (-s[0], -s[1]))), 8.0) | |
| w = _dd_div_dd(two_sin2, _dd_mul(sin_dpdt, sin_dpdt)) | |
| cot = (1 - 2 * s[0]) / (2 * np.sqrt(s[0] * (1 - s[0]))) | |
| scale = 2 * delta * cot + (cot * cot - 1 - L * (L + 1)) * delta * delta | |
| w = _dd_add(w, (scale * w[0], np.zeros_like(w[0]))) | |
| return w[0] + w[1] |
| # Stop within a few ulps: rounding sets a floor there, and the double-double | ||
| # step below converges quadratically from it. |
There was a problem hiding this comment.
Comment of the float64 version: no double-double step follows.
| # Stop within a few ulps: rounding sets a floor there, and the double-double | |
| # step below converges quadratically from it. | |
| # Stop within a few ulps: rounding sets a floor there. |
| delta = -(p[0] / dpdt) | ||
| north = _two_sum(theta, delta) |
There was a problem hiding this comment.
_two_sum(theta, delta): the float64 loop above already stops within 64 ulps, so no last step.
| delta = -(p[0] / dpdt) | |
| north = _two_sum(theta, delta) |
| south = _dd_add( | ||
| (np.full_like(theta, _PI[0]), np.full_like(theta, _PI[1])), | ||
| (-north[0], -north[1]), | ||
| ) |
There was a problem hiding this comment.
_dd_add with the double-double π: np.pi - theta.
| south = _dd_add( | |
| (np.full_like(theta, _PI[0]), np.full_like(theta, _PI[1])), | |
| (-north[0], -north[1]), | |
| ) | |
| south = np.pi - theta |
| (np.full_like(theta, _PI[0]), np.full_like(theta, _PI[1])), | ||
| (-north[0], -north[1]), | ||
| ) | ||
| weights = _weights_dd(s, p, d, delta, L) |
There was a problem hiding this comment.
_weights_dd: 2/(dP_L/dθ)² at the final angles.
| weights = _weights_dd(s, p, d, delta, L) | |
| weights = 2 / dpdt**2 |
| s = (np.array([0.5]), np.array([0.0])) | ||
| p, d = _legendre_by_differences_dd(s, L) | ||
| mid_theta, mid_weight = np.array([_PI[0] / 2]), _weights_dd(s, p, d, 0.0, L) |
There was a problem hiding this comment.
Middle node: _legendre_by_differences_dd and _weights_dd at s = 1/2, in float64.
| s = (np.array([0.5]), np.array([0.0])) | |
| p, d = _legendre_by_differences_dd(s, L) | |
| mid_theta, mid_weight = np.array([_PI[0] / 2]), _weights_dd(s, p, d, 0.0, L) | |
| _, _, dpdt_mid = _legendre_by_differences(np.array([0.5]), L) | |
| mid_theta, mid_weight = np.array([np.pi / 2]), 2 / dpdt_mid**2 |
| else: | ||
| mid_theta, mid_weight = np.array([]), np.array([]) | ||
|
|
||
| thetas = np.concatenate([north[0], mid_theta, (south[0] + south[1])[::-1]]) |
There was a problem hiding this comment.
north[0] and south[0] + south[1]: theta and south.
| thetas = np.concatenate([north[0], mid_theta, (south[0] + south[1])[::-1]]) | |
| thetas = np.concatenate([theta, mid_theta, south[::-1]]) |
|
@jasonmcewen Simplifying the code and removing the double-double rounding operators makes the code slightly faster yet slightly less accurate. The suggestions in my review above, applied together, give this file (float64 only, 86 lines against 205):
|
| L | first call (s): this PR / float64 / main | angles, max error (ulp): float64 / main | weights, max relative error: float64 / main | quadrature error max|G − I|: this PR / float64 / main |
|---|---|---|---|---|
| 64 | 0.00745 / 0.00221 / 0.00280 | 1 / 119 | 1.8e-15 / 9.3e-14 | 2.1e-15 / 4.2e-15 / 6.9e-15 |
| 128 | 0.0146 / 0.00482 / 0.00601 | 1 / 709 | 3.7e-15 / 3.4e-13 | 2.9e-15 / 9.5e-15 / 1.6e-14 |
| 256 | 0.0291 / 0.0177 / 0.0226 | 2 / 709 | 4.9e-15 / 6.9e-13 | 5.3e-15 / 1.9e-14 / 1.9e-14 |
| 512 | 0.0675 / 0.0383 / 0.0556 | 2 / 1,926 | 7.0e-15 / 2.2e-13 | 8.2e-15 / 4.6e-14 / 3.3e-14 |
| 1024 | 0.163 / 0.0526 / 0.162 | 2 / 7,433 | 1.7e-14 / 2.2e-12 | 1.2e-14 / 8.2e-14 / 5.2e-14 |
| 2048 | 0.400 / 0.121 / 0.508 | 5 / 147,254 | 2.4e-14 / 7.0e-11 | 1.8e-14 / 1.6e-13 / 1.2e-13 |
The quadrature error is that of the Gram matrix
Is this complexity / error trade-off worth it?
|
The same comparison in float32, as with
The quadrature error is that of the same Gram matrix as above, evaluated in long double at the float32 nodes and weights. |
Summary
s2fft's Gauss–Legendre (GL) sample angles and quadrature weights lose accuracy near the poles, by an amount that grows quickly with L. At L = 2048 the polar angles are 3e-14 rad from the exact nodes, and the polar weights are wrong by 7e-11 (relative).
This PR computes both from one routine: Newton's method in θ, with the last step and the weights in double-double arithmetic. Against binary128, every angle and every weight is correctly rounded in every case tested. That is every node of every L from 1 to 4096, and of L = 8191, 8192, 8193, 16383 and 16384.
When the angles and the weights are both needed, as in the forward transform, it is also faster than now from L ≈ 1024, and much faster at large L. No public function or signature changes.
Fixes #432.
The problem
The angles.
s2_samples.thetas(L, "gl")takesnp.arccosof numpy'sleggaussroots.arccosamplifies any error δx in a root by 1/sin θ:The weights.
quadrature.quad_weights_gl_theta_only, and its JAX copy, find their own nodes by Newton's method in x. They stop when |Δx| ≤ 1e-14, and evaluate P_L′ at the previous iterate.Measured against binary128 nodes and weights, on main (d7afe6d):
In every case the largest errors are in the first three rings from a pole.
Effect on the transforms.
The fix
A new private module,
s2fft/sampling/_gauss_legendre.py, computes the angles and the weights together.s enters only multiplicatively. No rounded x = 1 − 2s is formed, so its relative accuracy is kept near the poles.
Then they are rounded once.
s2_samples.thetas(L, "gl"),quadrature.quad_weights_gl_theta_onlyandquadrature_jax.quad_weights_gl_theta_onlynow call it. The JAX function stays jitted, and its weights are constants at trace time. The torch weights wrap the JAX ones.lru_cache, 16 entries). L goes throughoperator.indexfirst. The cached arrays are read-only, and callers get copies.ValueError, as before.Design choices.
thetasand the weights are called on every NumPy transform. Concurrent first calls for the same L may compute it twice, with equal results.Results
Accuracy against binary128 (Newton in x with the three-term recurrence, then
arccos). Every node of every L from 1 to 4096 was checked, and of L = 8191, 8192, 8193, 16383 and 16384: 8.4 million nodes in all.Time for a first call, single-threaded on one core of an aarch64 host. Later calls are cached.
leggauss) and weightsThis PR computes the angles and weights together, so a first call costs the same whether it is for the angles, the weights or both. A first call for the weights alone is therefore slower than now: about 6 times at L = 4096. On main the angles alone cost about as much as
leggauss, which solves an O(L³) eigenvalue problem; Newton's method in θ is O(L²).Tests
test_quadrature.py.test_gl_angles_and_weights_against_mpmathcompares the angles and weights, for exact equality, with 40-digit Newton iterations in x usingmpmath.legendre, an independent route.test_gl_angles_and_weights_inputs_and_copieschecks that a zero-dimensional integer array works as L, and that changing a returned array does not change later results.pytest.importorskip. It could also be listed in the test extras.Compatibility
quadrature_jax.quad_weights_gl_theta_onlyis still a jitted function.ValueError, as before, with a new message.np.int64works as before. Zero-dimensional integer arrays work for the weights as before, and now also forthetas.sampling/_gauss_legendre.py: about 110 lines of code, 200 with comments and docstrings), plus the tests.Relation to #430
The two PRs are independent. Each applies to main on its own, and they touch no file in common.
Together they remove the excess GL error near the poles. The measurement is at L = 512 on GL, with JAX on the CPU, against exact samples at the exact nodes, with complex Gaussian coefficients and a binary128 reference. The synthesis columns give the RMS error over the samples within 1° of the poles and at 20–160°, and the largest error with its ring's angle. The analysis column is the forward transform of the exact samples.
On main, the recursions' own errors are larger than the effect of the angles at every latitude, so at L = 512 this PR alone barely changes the transforms' errors. With #430, the angles account for the excess near the poles in this test, and this PR removes it; what remains is transform round-off, at the mid-latitude level.
🤖 Generated with Claude Code
https://claude.ai/code/session_01W95ivh57fecWLC2t6f5L57