Integrate Hex8 mass verification and fixed-null-basis shell dynamics with numerical and physics handoff evidence. Preserve interrupted reference and full-validation status; full integration validation is deferred until after performance optimization.
6.7 KiB
C08 N3 좌표 표현과 increment arithmetic 분리 제안
상태: 2026-10-13 사용자 승인, HHT-ADR-016. 아래 변경안의 구현·검증을 진행한다. 승인 이전 공식 compensated C08a는 native8/888.432s FAIL이며 변경본 통과로 승계하지 않는다. 아래 승인 전 설명은 제안 당시의 범위와 결정 근거로 보존한다.
현재 충돌의 실제 증거
공식 로그 .dryforge/hht-remediation-20261012/compensated-c08a-release.log의 SHA256은 a8e8d5fcee3fe1d6aa60b56394fc53a8f74f42807e7c10089e8268aeb8611309이다. Required requested-trace 실패는58개(512 grid6개,1024 grid52개)이며 동일 component의 whole-q update 실패도58개다.
각17-digit 로그 값을 원래 binary64로 복원하여 Python Fraction으로 정확히 계산했다. Gate target은 old_p + stored_increment, 별도 requested target은 old_p + signed_sum + compensation이다. Gate target의 가장 가까운 binary64 좌표와 양쪽 인접 좌표를 검사했다. 모든58개에서 현재 high가 최적값이며 세 좌표 모두 원1e−12 조건에 실패한다. 좌표 간격은 monotonic이므로 더 먼 binary64 좌표도 통과할 수 없다. 이 사례들의 subtraction low는0이며 최종 subtraction 손실이 원인은 아니다.
| 사례 | 첫 실패 | 최악 실패 |
|---|---|---|
| grid/increment/full | 512/278/6 | 1024/555/6 |
| old p | .071709031890658609 | .07170906968934286 |
| current/nearest high | .071707935756794142 | .07170874594859544 |
| stored increment | −1.096133864469764e−6 | −3.2374074742216707e−7 |
| uncancelled scale | 1.0961338644697645e−6 | 3.237407474221672e−7 |
allowed defect 1e−12*scale |
1.0961338644697644e−18 | 3.2374074742216723e−19 |
| actual best defect | 2.600391148070702e−18 | 3.911862848216376e−18 |
| best ratio | 2.3723299063737948e−12 | 1.208331938245387e−11 |
| predecessor/current/successor ratios | 1.02883e−11 / 2.37233e−12 / 1.50330e−11 | 3.07837e−11 / 1.20833e−11 / 5.49503e−11 |
| current low | −2.6003877354211524e−18 | −3.911862569787138e−18 |
두 표 사례는 high + low와 정확 requested target이 exactly 동일하다. 전체58개 pair-target gap의 최대는7.703719777548943e−34이다. 따라서 남은 실패를 더 정밀한 correction 누적으로 해결한다는 증거는 없다. 이전 C08b1024의 plain-addition 실패는 neighbor가 PASS 가능했고 compensated arithmetic으로 실제 해결된 별도 사례다.
재현 command: python .dryforge/hht-reduced-c08a-finer-20261013/analyze-compensated-c08a.py (exit0). 전체58개 exact rational gap, nearest/neighbor ratio, source-log identity는 같은 디렉터리 compensated-c08a-representability.json에 기록했다. 독립 numerical reviewer도 Fraction 계산으로 같은 결론을 확인했다. 실행 중인 shared binary나 원본 reference는 변경하지 않았다.
최소 변경안: 산술 검사는1e−12, 저장 표현은 별도 측정
원N3의 작은 increment 손실 검출 의도는 유지한다. 독립 requested trace와 실제 compensated candidate pair의 increment를 기존 uncancelled scale 및1e−12로 검사하고, public/model에 저장하는 high의 표현 오차를 별도로 검사하는 방안을 제안한다. 이 변경은 acceptance 변경이므로 사용자 승인 전 구현하지 않는다.
- 현재 실제 TwoSum 경로의
(p_high,p_low)와 독립 Neumaier requested trace를 유지한다. Trace를 candidate state에 복사하지 않는다. Predictor의 원래 두 요청 항, 선택된 old-start의 exact correlation, 모든 requested Newton correction을 포함한다. - Exact candidate increment
D_pair=(p_high+p_low)−old_accepted_high를 EFT TwoDiff/TwoSum expansion으로 계산한다.|D_pair−T|/S<=1e−12를 whole-q 및 requested trace 양쪽에 적용한다.T는 독립 요청 trace 또는 원래 HHT 우변이고S는 해당 원래 uncancelled 항 절댓값 합이다. Old accepted history는 실제 저장 high이며 이전 increment의 low를 숨겨서 더하지 않는다. Zero-scale exact0와 finite-first는 유지한다.p=pp+beta*h²*Ar를 다시 계산하여 현재 primary candidate를 대체하지 않는다. - 실제 저장 high가 pair의 round-to-nearest/ties-to-even 결과인지 별도로 검사한다.
B_repr=|p_low|를 측정하며 인접 좌표 spacing의 half-ULP 안에 있어야 한다. Exact tie는 even 규칙까지 검사한다. Low의 overflow/underflow 및 EFT 유효성은 fail-closed로 다룬다. 필요 subtraction/trace rounding은 실제 compensated 연산의 별도 outward radius로 기록하며 임의 norm floor를 넣지 않는다. - Raw stored-high increment의 기존 ratio와 정확 representation distance는 diagnostic으로 계속 기록한다. 별도의 ULP floor나 representation budget을1e−12 분모/허용량에 더하지 않는다. Arithmetic gate와 independently checked correct-rounding gate를 모두 통과해야 한다. 검증 expansion 자체의 유효성/finite 조건을 만족하지 못하면 FAIL이며 표현 오차로 산술 결함을 숨기지 않는다.
현재 남은 두 사례의 pair arithmetic defect는0인 반면 stored high representation defect가 scale 기준을 초과한다. 이 분리가 필요하다는 구체적 근거다. 1e−12 자체를 올리거나 max(1,...) 분모를 추가하는 제안이 아니다. 최종 high 좌표를 nextafter/clamp/projection으로 바꾸는 방식도 사용하지 않는다.
이 제안은 reduced private p의 resolved whole/requested increment 검사에 한정한다. Absolute q/v/ap/public-A update, full physical residual, hidden constraints, CA whole-history radius, N2/N4/N7, temporal order와 factor100, public schema와 stored reference를 유지한다. Pair low는 실제 arithmetic remainder이며 새로운 물리 history 변수로 재해석하지 않는다. 모든 이전 FAIL 로그는 보존한다.
승인 후 필요한 검증
- Exact binary64 nearest/half-ULP/tie, subnormal 및 nonfinite 단위 검사. 실제 correction을 누락하거나 잘못 더한 mutation은 arithmetic gate에서 FAIL해야 한다.
- 위 공식58개 frozen 사례에서 기존 stored-high criterion FAIL을 먼저 유지하고, 승인된 pair arithmetic 및 representation 검사를 각각 검증한다. 첫/최악 사례와 이전 solvable C08b 사례를 구분한다.
- Production와 C08 controller에 같은 기준을 적용하고 configured 관련 unit checks 및 공식 C08a/C08b 전체 grid, N7 separation, 원본 reference를 새 source identity로 재실행한다. 과거 trajectory/scratch PASS를 현재 공식 PASS로 승계하지 않는다.
관련 구현·이전 red/green: implementation-c08-reduced.md. 현재 계약 원문: numerical-controls.md.