Skip to main content

Module arithmetic

Module arithmetic 

Source
Expand description

Built-in arithmetic for the engine’s three native compute predicates.

pilji (multiply), sumji (add), and dilcu (divide) each assert the relation x1 = x2 op x3. This is the SINGLE shared evaluation used by both the nibli-reason engine fast path (compiled into the WASM guest) and the nibli-host host fast path — nibli-types is the one crate both depend on. The Python reference backend (python/nibli_backend.py) mirrors the same semantics.

Functions§

eval_arithmetic
Evaluate a built-in arithmetic predicate x1 = x2 op x3 over three numbers.