From defb2cf06a9b5db9429ca368d8c2af127a5c9c3d Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 19 Oct 2026 01:53:40 +0100 Subject: 027's 5c: money as i64 minor units shown by .Nd: NUM_TEXT's decimal form takes digits (bits 20-24 as FIXED's), an integer's last N digits written after a point (1234 at two is 12.34, -5 -0.05, 0 0.00; width and zeros after the sign), verification allowing digits on FIXED and DECIMAL alone; unit test: ten rows of formats_and_held (-2^63 at two, 25 digits, a number's whole 1234, its 12.5 a limit); TPC-C's money i64 cents and its rates ten-thousandths (tables, messages, load, the transactions), SQLite's INTEGER columns and int64 bindings alike, the comparison now exact (no 1e-9 tolerance): after 20,000 transactions every row of every table the same (grouped SQLite too) and 3.3.2 holding on both; counts: b45 against b44 BFS without batches +0.09%, the rest within 0.001%; the bank's queries (s44 and s45 in turns, six each) in_credit -0.59%, per_branch -0.34%, ranks -0.20%, the rest within 0.01%, the seven answers the same bytes; 008 (NUM_TEXT's digits, a message row's i64 cells), 027 and 092 --- docs/research/092-tpcc.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/research') diff --git a/docs/research/092-tpcc.md b/docs/research/092-tpcc.md index 4cac74e..0e73de1 100644 --- a/docs/research/092-tpcc.md +++ b/docs/research/092-tpcc.md @@ -23,6 +23,8 @@ Order-Status, Delivery, Stock-Level)을 aup 앱 하나로 쓰고, 같은 트랜 넣는다. 없는 상품(주문의 1%)이 나오면 이벤트가 실패하고 그때까지의 변경이 모두 되돌려진다. Delivery는 구역의 가장 오래된 미배송 주문의 줄들을 조각(`lines[주문*16 .. 주문*16+16]`)으로 훑어 금액을 더한다. Stock-Level은 구역의 마지막 20 주문의 줄을 조각으로 훑어 재고가 기준보다 적은 상품을 중복 없이 센다(`distinct`). +(2026-10-19부터 돈은 i64의 센트, 세율과 할인율은 i64의 만분율이고 SQLite도 INTEGER다. 두 쪽의 행은 오차 없이 같다: +[027](../design/027-computation-core.md)의 5단계. 아래의 코드와 결과는 그 전의 binary64 금액이다.) ```aup on new_order { -- cgit v1.2.3