diff options
| author | eunhhu <[email protected]> | 2026-10-19 01:13:07 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-19 01:13:07 +0100 |
| commit | b79f627af433a63f8f42869b124f5ef344a49352 (patch) | |
| tree | 02aebc9cb63ace5040e5467949f3bec91edabf36 /docs/design/008-module-format.md | |
| parent | 7e1b3dc160906abaecfd4fe49ab2a51a3e2bfda4 (diff) | |
| download | pure-b79f627af433a63f8f42869b124f5ef344a49352.tar.gz pure-b79f627af433a63f8f42869b124f5ef344a49352.zip | |
027's stage 5 designed and 5a made: two numbers (number, binary64, the default of literals and of counts, positions, lengths and u32 fields, whole to 2^53 exactly; i64 the exact integers past it, bits and money, never mixed, moved by number() and i64() when exact), / a number's division, // the floored quotient, i64 folds exact (only the result in range, so in any order), number folds in order unless the batch executor's 2^53 test says any order is exact, money as i64 minor units shown by .Nd, a replace carrying number, bool and i64 when exact; 5a: opcode FLOORDIV (95, 96 now): a number's floored quotient as Python's float //, exactly (a less its floored remainder, divided, to the nearest whole; a zero signed as a / b; by zero divide), a new opcode so the JIT, the tier and the batch executor leave it to the executor; unit test floor_division (7 // 2, -7 // 2, 7 // -2, 1 // 0.1 = 9, 0 // -3 = -0, 1e300 // 7, by zero); counts: b43 against b42 within 0.001% but BFS without batches -0.09%; the bank's queries (s42 and s43 in turns, six each) -0.20% to 0.00%; 008 and 027
Diffstat (limited to 'docs/design/008-module-format.md')
| -rw-r--r-- | docs/design/008-module-format.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md index dde292e..201baf9 100644 --- a/docs/design/008-module-format.md +++ b/docs/design/008-module-format.md @@ -36,7 +36,7 @@ v7은 027의 4단계(패턴 모으기)의 판이다. 4b로 **키별 문서**를 인자 셋이고, 키의 누름과 뗌, text 입력, 타이머, frame, 가리킴은 메시지 입력의 묶음(무엇이 그 메시지를 만드는가)이다. 핸들러의 이벤트는 그 입력의 번호이고, DT와 TEXT_INPUT은 필드 읽기(FIELD)가 대신한다(아래 표의 번호가 당겨졌다). 4e로 **보기가 아무 값**이 되었다: 보기와 열의 타입이 레코드 필드의 것(바이트와 리스트가 더해졌다)이고, 표는 리스트 보기다. 리스트 보기는 리스트 상태 그대로나 그 지도, 또는 블록이 -낸 리스트를 행으로 가지며, 보기 항목은 20바이트다. 4단계가 끝날 때까지 v7은 걸음마다 바뀐다(1.0 전, 생산자는 aup 하나다). +낸 리스트를 행으로 가지며, 보기 항목은 20바이트다. 5단계(수의 모델)로 내림한 몫(FLOORDIV, 95)이 더해졌다. 4단계가 끝날 때까지 v7은 걸음마다 바뀐다(1.0 전, 생산자는 aup 하나다). **레코드 안의 리스트**(027의 2b). - 레코드 필드의 타입 4(LIST)는 항목들의 레코드를 기본값 자리(i64)에 둔다. @@ -181,6 +181,7 @@ v7은 027의 4단계(패턴 모으기)의 판이다. 4b로 **키별 문서**를 | 92 | RETURN | … r… → | 함수 `인자`(자신)를 끝낸다. 맨 위의 결과가 부른 쪽으로 간다 | | 93 | CHAR_AT | t q → q | text의 바이트 자리 q(i64)에서 시작하는 글자의 코드 포인트(i64). 글자가 시작하지 않는 자리나 밖이면 `limit` | | 94 | CHAR | q → t | 코드 포인트 하나의 text. 0–0x10FFFF 밖이면 `limit`, 서로게이트면 `encoding` | +| 95 | FLOORDIV | n n → n | 내림한 몫(027의 5단계): MOD의 나머지를 뺀 a를 b로 나눈 것을 가까운 정수로(파이썬의 float `//`와 같다. `1 // 0.1`은 9). 0의 부호는 a / b의 것. 0으로 나누면 `divide` | bool은 실행 중에 수의 칸에 든 0이나 1이고, i64는 같은 8바이트의 정수다. CONST의 인자 2는 i64 상수(값의 8바이트), NUM_TEXT의 인자 2는 i64의 10진 글자다. LOAD·STORE·지역 칸·항목·FIELD·SEND는 i64를 수처럼 옮긴다. FOLD의 종류에 64(PURE_FOLD_INTEGER)를 |
