aboutsummaryrefslogtreecommitdiffstats
path: root/docs/design/027-computation-core.md
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 01:31:39 +0100
committereunhhu <[email protected]>2026-10-19 01:31:39 +0100
commit809a83a5764ec0f0c84b96c43a20cfb906eee031 (patch)
treefe255be70914400060d810ec9ecd68c0edf1305e /docs/design/027-computation-core.md
parentb79f627af433a63f8f42869b124f5ef344a49352 (diff)
downloadpure-809a83a5764ec0f0c84b96c43a20cfb906eee031.tar.gz
pure-809a83a5764ec0f0c84b96c43a20cfb906eee031.zip
027's 5b: an i64 sum exact: its items gathered in a 128-bit integer and only the result checked against the range (overflow past it), so a sum past the range midway and back in it at the end is the answer and an i64 sum's order is none of its business; the batch executor's folds are numbers' lanes alone, summed in the items' order, as before; 008's FOLD says so; counts: b44 against b43 within 0.04% (BFS without batches -0.03%); the bank's queries (s43 and s44 in turns, six each) per_branch -1.32% (all six below s43's lowest: a larger Fold lays the number sum's loop otherwise), in_credit -0.72%, ranks -0.26%, the rest within 0.01%, the seven queries' answers the same bytes on both; 008 and 027
Diffstat (limited to 'docs/design/027-computation-core.md')
-rw-r--r--docs/design/027-computation-core.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/design/027-computation-core.md b/docs/design/027-computation-core.md
index 4c7fb60..0813958 100644
--- a/docs/design/027-computation-core.md
+++ b/docs/design/027-computation-core.md
@@ -539,6 +539,15 @@
200쌍의 `a // b`와 `a % b`를 파이썬과 비트까지(−0의 부호까지) 견준다. 진단 하나(305).
- 명령 수(b43 대 b42): 실행기만의 BFS −0.09%, 나머지 ±0.001% 안이다. 은행 질의(s42와 s43을 한 번에 번갈아 여섯 번)는 −0.20%에서
0.00% 사이다.
+ - **5b 만듦(2026-10-19).**
+ - Pure: i64의 sum을 128비트 정수(`__int128`)에 정확하게 모으고, 접기가 끝날 때 결과만 범위를 본다(넘으면 `overflow`). 중간의
+ 넘침이 사라져 i64 합은 항목의 차례에 매이지 않는다. 128비트는 i64 2^64개의 합을 담는다. 묶음 실행기의 접기는 number의 레인뿐이고
+ 항목의 차례대로 더하므로 그대로다(i64의 접기는 항목마다 돈다).
+ - 시험: aup의 시험이 i64 리스트에 가장 큰 i64, 1, −2, 2를 차례로 더하며 합의 보기를 본다: 가장 큰 i64, `overflow`(보기가 빈다),
+ 가장 큰 i64 − 1(중간이 넘쳤어도 답이다), `overflow`. 008의 FOLD에 그 뜻을 적었다.
+ - 명령 수(b44 대 b43): ±0.04% 안이다(실행기만의 BFS −0.03%). 은행 질의(s43과 s44를 한 번에 번갈아 여섯 번의 중앙값)는 per_branch
+ −1.32%(여섯 번 모두 s43의 가장 낮은 것 아래: Fold가 커져 number 합의 고리가 달리 놓였다), in_credit −0.72%, ranks −0.26%, 나머지
+ ±0.01% 안이다. 일곱 질의의 답은 두 빌드에서 바이트까지 같다.
**순서의 까닭.**
- 1과 2가 묶음의 명세 대부분을 연다. 가장 값이 크다.