diff options
| author | eunhhu <[email protected]> | 2026-10-19 01:31:39 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-19 01:31:39 +0100 |
| commit | 809a83a5764ec0f0c84b96c43a20cfb906eee031 (patch) | |
| tree | fe255be70914400060d810ec9ecd68c0edf1305e /docs | |
| parent | b79f627af433a63f8f42869b124f5ef344a49352 (diff) | |
| download | pure-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')
| -rw-r--r-- | docs/design/008-module-format.md | 2 | ||||
| -rw-r--r-- | docs/design/027-computation-core.md | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md index 201baf9..0ef9bf8 100644 --- a/docs/design/008-module-format.md +++ b/docs/design/008-module-format.md @@ -185,7 +185,7 @@ v7은 027의 4단계(패턴 모으기)의 판이다. 4b로 **키별 문서**를 bool은 실행 중에 수의 칸에 든 0이나 1이고, i64는 같은 8바이트의 정수다. CONST의 인자 2는 i64 상수(값의 8바이트), NUM_TEXT의 인자 2는 i64의 10진 글자다. LOAD·STORE·지역 칸·항목·FIELD·SEND는 i64를 수처럼 옮긴다. FOLD의 종류에 64(PURE_FOLD_INTEGER)를 -더하면 sum·max·min·distinct가 i64 값을 받는다(sum이 범위를 넘으면 `overflow`). i64 키 목록은 정수로 비교한다. `f`는 레코드 필드의 타입(수, text, bool 또는 i64)이고, `k`는 그 리스트의 키 필드 타입이다. 수 연산 결과가 유한하지 않으면 실패한다. 실패하면 그 이벤트의 모든 +더하면 sum·max·min·distinct가 i64 값을 받는다(sum은 정확하게 셈하고 결과가 범위를 넘을 때만 `overflow`: 중간이 넘쳐도 끝이 i64 안이면 답이라 항목의 차례에 매이지 않는다). i64 키 목록은 정수로 비교한다. `f`는 레코드 필드의 타입(수, text, bool 또는 i64)이고, `k`는 그 리스트의 키 필드 타입이다. 수 연산 결과가 유한하지 않으면 실패한다. 실패하면 그 이벤트의 모든 핸들러가 한 일이 취소된다. ## 로드할 때 검증하는 것 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가 묶음의 명세 대부분을 연다. 가장 값이 크다. |
