Aksioma un punkts, kas kustas
Punkts pārvietojās, līgums nē
Fiksētā komata aritmētika ir pievilcīga, jo tā ir godīga. Jūs izvēlaties mērogu, pasakāt, kur dzīvo komats, un iekārta pārstāj izlikties, ka katrs skaitlis ir sīka laika prognoze. Tas padara atkārtošanu mierīgāku, iegultos mērķus vieglāk saprotamus un auditus mazāk atkarīgus no frāzēm kā aptuveni pietiekami. Burvīgi. Arī nepilnīgi.
Viens fiksēts mērogs var būt pārāk neass. Izvēlieties mērogu, kas apstrādā ļoti mazas vērtības, un lielākām vērtībām pietrūkst vietas. Izvēlieties mērogu, kas apstrādā lielākas vērtības, un mazās vērtības zaudē noderīgu detalizāciju. Darbu var sadalīt vairākos tipos, bet tagad kodā ir cita veida juceklis. Apsveicam, decimālais komats tagad ir personāla problēma.
AXIOM pastāv gadījumiem, kad komatam jāpārvietojas, nepārvēršot skaitļu slāni atpakaļ peldošā komata zupā. Dweve kodā tā ir adaptīva mainīga komata saime: katra konkrētā vērtība nes zīmi, eksponentu saraksta indeksu un mantisu iepakotā 32 bitu attēlojumā. Eksponents nav apkārtējās aparatūras noskaņojums. Tas ir izvēlēts no skaidra saraksta. Mantisa ir vesela skaitļa slodze. Attēlotā vērtība ir zīme reiz mantisa reiz divi pakāpē mīnus izvēlētais eksponents. Šis teikums nav mīlīgs, bet tajā ir viss triks.
Svarīgākais nav tas, ka komats pārvietojas. Peldošais komats jau pārvieto komatu. Svarīgākais ir tas, ka AXIOM to pārvieto pa deklarētu sarakstu, ko var pārskatīt, testēt, specializēt un saglabāt deterministisku. Kods neprasa platformai improvizēt skaitlisku personību. Tas vērtībai dod kompaktu līgumu un liek aritmētikai pēc katras darbības atgriezties pie šī līguma.
Avotā konkrētā forma ir Axiom<M, E>. Mantisas platums jāiekļauj attēlojumā, ar praktiskiem aizstājvārdiem kā Adp4, Adp8, Adp16, Adp23, AdpNN4 un AdpNN8. Šie nosaukumi nav rotājumi. Tie stāsta, cik liela slodze un kāds eksponenta profils vērtībai jāizmanto. Vērtība ar NN formas eksponentu sarakstu nav tas pats solījums kā vērtība ar plašāku vispārīgu sarakstu. Uzskatīt tās par vienādām tāpēc, ka abas izskatās skaitliskas, ir tas, kā nopietnas kodu bāzes sāk krāt folkloru.
Mainīgais komats nav noskaņojums
Frāze adaptīvs mainīgais komats var izklausīties tā, it kā kāds pārdēvētu peldošo komatu, lai iepirkums izietu sanāksmē. Tā nenotiek. AXIOM nepadara eksponentu par neredzamu blakusefektu. Eksponents tiek izvēlēts no saraksta, kas pievienots tipam vai stratēģijai. Pašreizējā avotā konkrētie eksponentu saraksti ietver standarta [16, 8, 4, 0], blīvu [12, 8, 4, 0], neironu tīkla svaru [8, 6, 4, 0] un smalku sarakstu [16, 14, 12, 10, 8, 6, 4, 0]. Tās ir pašreizējās avota vērtības, un šī atšķirība ir svarīga, jo avots laika gaitā ir mainījies; pašreizējie apgalvojumi jāseko pašreizējam kodam, nevis novecojušiem eksponentu sarakstiem.
Saraksts ir produkta lēmums. Standarta saraksts dod dažas plašas joslas. Blīvs saraksts maina, kur joslas atrodas. NN saraksts ir veidots svaru līdzīgiem datiem. Smalkais saraksts piedāvā vairāk tuvu izvēļu. Nekas no tā nenoņem spriedumu. Tas pārvieto spriedumu vietā, kur koda pārskatīšana to var redzēt.
This is the difference between a controlled adaptive representation and a general excuse. A fixed-point type says every value here uses this scale. AXIOM says every value here chooses from this declared set of scales. That is a wider contract, not a missing one. The point moves, but it moves on rails. Very Dutch, really. Even the decimal point has infrastructure.
It is worth being precise about what AXIOM is not. It is not exact rational arithmetic. It is not a license to ignore range analysis. It is not a benchmark claim. It is not a guarantee that the chosen exponent list fits your workload because the acronym looked energetic. You still need to understand the values, the dynamic range, the acceptable error, the deployment target, and the replay requirements. AXIOM makes those choices more inspectable. It does not make them go away. If anything, it makes lazy numeric thinking harder to hide, which is usually where the screaming starts.
Arithmetic has to come home
A number format is easy to draw and harder to make useful. The useful part is the arithmetic. Addition and subtraction have to deal with values that may be sitting on different exponent bands. Multiplication and division have to do wider integer mantissa work before returning the result to the target shape. After the operation, the value has to normalize back into an available exponent choice. That last step matters because a representation that cannot come home is just a holiday abroad with better branding.
AXIOM arithmetic therefore has a rhythm. Bring in packed values. Align or widen as needed. Perform the integer-oriented operation. Normalize. Store the result back into the declared shape. If it does not fit, that should be visible as a representation problem, not quietly delegated to the mood of the machine. The contract is useful because it has edges.
This is the same reason Numerus matters around it. The wider stack is not trying to collect number formats like stamps. It wants arithmetic that can survive replay, embedded deployment, simulation, model compression, tests, and audit trails. AXIOM is one family inside that story. It handles a particular problem: values whose useful scale changes, but whose behaviour still has to be deterministic.
That is the boring sentence that saves teams later: normalize back into shape. It sounds like implementation detail until a replay differs, a threshold flips, or a compressed model behaves differently on a smaller target. Then it becomes the sentence everyone wishes had been in the architecture document.
Why AXIOM sits under Numerus
The public Numerus story is deliberately simpler than the source tree. Most readers want to know whether the numeric layer can give deterministic arithmetic, fixed-point families, decimal behaviour, no_std posture, integer-oriented embedded profiles, verification, and the same answer twice. They do not need every internal type on the first page. That is not secrecy. That is mercy.
Zemāk kopējais skaitļu slānis ir plašāks. Tas ietver bināros, trīskāršos, vietējos un sub-baitu veselo skaitļu tipus, fiksētā punkta aizstājvārdus, ar peldošo punktu saistītus tipus saderības darbam un adaptīvo AXIOM. Kopīgie atribūti šīm saimēm dod vienotu virsmu. Numerus pēc tam iesaiņo daļas, kurām jābūt produktam paredzētām: binārais un decimālais fiksētais punkts, AXIOM, veselie skaitļi, darbības, DSL virsmas un verifikācijas nostāja. Šī nošķiršana ir veselīga. Pamats var būt plašs, nepadarot publisko lapu par ēdienkarti no restorāna, kas zaudējis pārliecību.
AXIOM ir pelnījis savu rakstu, jo tas nav tikai vēl viens ieraksts šajā sarakstā. Fiksētais punkts ir par punkta novietošanu vienā vietā. Decimālais fiksētais punkts ir par precīzām bāzes desmit vietām. Binārās un trīskāršās formas ir par kompaktām zemu bitu ceļiem. AXIOM ir par punkta padarīšanu par kontrolētu vērtības daļu. Tas maina to, kā domājat par attēlojumu, aritmētiku, testiem un izvietošanu.
Tas arī maina to, kā publiskie apgalvojumi būtu jāierobežo. AXIOM veiktspēja pieder pašreizējiem etaloniem uz pašreizējā koda, nevis mantotai folklorai. Plašāko steku nevajadzētu raksturot kā nulles peldošā punkta darbību, jo konversijas un attēlošanas virsmas var šķērsot šo robežu. Drošāks un precīzāks apgalvojums ir, ka pamata fiksētā un adaptīvā aritmētika ir orientēta uz veseliem skaitļiem un veidota deterministiskai uzvedībai. Šis teikums ir mazāk iespaidīgs. Labi. Iespaidīgi skaitļu apgalvojumi ir tas, kā informācijas paneļi kļūst par atvainošanās ģeneratoriem.
Vairāki skaitļošanas ceļi, viena saime
Konkrētā iesaiņotā vērtība ir tikai sākums. Avotā ir vairāk nekā viens veids, kā izmantot AXIOM, jo darba slodzes nav pietiekami pieklājīgas, lai uz visiem laikiem ietilptu vienā izkārtojumā. Ir iesaiņotais konkrētais ceļš kompilācijas laika eksponentu sarakstiem. Ir Flex<S> izpildlaika eksponentu glabāšanai veselu skaitļu glabāšanas izmēros. Ir tenzoru un bloku formas, kur kopīga eksponentu struktūra var būt noderīga. Ir stratificēta apstrāde. Ir APoT, kur vērtības var attēlot kā parakstītu divu pakāpju summas, lai reizināšana varētu kļūt par nobīdēm un saskaitījumiem. Ir profilēšanas un apgūto eksponentu pētniecības kods ap to.
Šī izplatība nav iemesls mežonīgiem apgalvojumiem. Tas ir iemesls būt uzmanīgiem ar darba slodzi. Skalāra atkārtojuma ceļš, partijas kvantizācijas ceļš, tenzoram līdzīgs ceļš un APoT svara ceļš piedzīvo dažādus spiedienus. Atmiņas izkārtojums, eksponentu atkārtota izmantošana, diapazons, normalizācija un aparatūras forma visi ir svarīgi. AXIOM dod vārdu krājumu šīm izvēlēm. Tas neatbrīvo nevienu no to izdarīšanas.
Šeit inženierija kļūst interesanta. APoT nav tikai gudrs saspiešanas triks. Piemērotām vērtībām tas pārvērš reizināšanu par nobīdes un saskaitīšanas problēmu. Tenzoru un bloku ceļi var dalīt eksponentu struktūru, kad darba slodzei ir pietiekami daudz formas. Flex saglabā izpildlaika eksponentu glabāšanu pieejamu, kad tipa līmeņa saraksti ir pārāk stingri. Neviens no tiem nav jāizvēlas tāpēc, ka diagramma izskatījās jauka. Darba slodze izvēlas, vai arī kļūdu ziņojums izvēlēsies vēlāk un būs daudz mazāk burvīgs par to.
Kā pārskatīt AXIOM izvēli
The first review question is boring and therefore useful: why not a simpler number type? If the value is money or a regulated decimal amount, Decimal may be the right answer. If the range is small and well bounded, a Q-format fixed-point type may be calmer. If the number exists only to interoperate with a file format or external API, a float-related type might be the honest edge adapter. AXIOM earns its keep when the workload has changing magnitude, still needs a deterministic contract, and benefits from an explicit exponent set.
The second question is whether the exponent list describes the data or merely flatters the engineer. A list with four broad bands is a different tradeoff from a fine-grained eight-entry list. The NN-shaped list is not a decorative label. It says the values are expected to behave like weight data. If the distribution does not match the list, the representation will still run. Software is often willing to do the wrong thing at impressive speed. That does not make it a design.
The third question is where normalization pressure appears. Addition across distant exponent bands can discard detail. Multiplication can create a result that needs a different band. Repeated operations can accumulate pressure at exactly the places the demo did not visit. The review should ask for boundary tests around zero, sign changes, exponent transitions, large mantissas, and repeated operations. If those cases feel annoying, good. They are probably the cases that matter.
The final question is how the representation leaves evidence. Which type alias did we choose? Which exponent list? Which mantissa width? Which conversion path? Which oracle or property test backs the claim? If the answer is scattered across comments and optimism, the system has already lost some of the benefit. AXIOM is most useful when the numeric choice becomes part of the architecture record, not a clever local trick hidden three modules down.
Verification beats hero numbers
Numerical formats attract hero numbers. Smaller. Faster. More efficient. Better. The words are cheap and usually arrive before the test harness, which is exactly the wrong order. For AXIOM, the responsible posture is to treat benchmarks as per-release evidence, not mythology. If the benchmark has not been rerun on current source, current compiler, current flags, and current hardware, it is not a public claim. It is a postcard from a previous afternoon.
What matters more is the verification route. Does encoding and decoding stay within the declared contract? Do operations normalize into a legal shape? Do edge cases around exponent boundaries behave intentionally? Do property tests cover the annoying values that humans forget because humans have hobbies? Does a high-precision oracle exist where comparison is meaningful? Can replay rebuild the same value path?
That last question is the reason this belongs in our stack. Dweve keeps building toward systems where computation leaves evidence: parsers with receipts, ledgers with typed events, retrieval with deterministic paths, data formats that do not haul a wagon of repeated keys, simulation and numeric layers that can replay. AXIOM fits because moving the point should not mean losing the receipt.
The lesson
The lesson of AXIOM is not that fixed-point was wrong. Fixed-point is still one of the cleanest tools we have. The lesson is that one fixed scale is not always enough, and the alternative does not have to be opaque floating behaviour. A value can carry a controlled exponent choice. The point can move while the contract stays visible.
Šis ir publiskais stāsts, ko ir vērts izstāstīt. Dweve AXIOM iesaiņo zīmi, eksponenta indeksu un mantisu. Tas izvēlas no skaidri noteiktiem eksponentu sarakstiem. Tas izmanto uz veseliem skaitļiem orientētu aritmētiku un normalizē rezultātus atpakaļ deklarētajās formās. Kodā tam ir konkrēti, elastīgi, tenzoru, bloku, slāņoto, APoT un pētniecības ceļi. Tas pieder pie Numerus, jo deterministiska aritmētika nav blakus uzdevums. Tā ir daļa no tā, kā nopietnas sistēmas divreiz iegūst vienu un to pašu atbildi.
Punkts mainās. Atbildība nemainās. Tas ir tas noderīgais.