Skip to main content

API Reference

The BoxMath SDK ships two isomorphic implementations of the same primitives:

PackageSourceLanguageArithmetic
boxmathmystical-metaphysical-number-system/boxmathTypeScriptbigint — exact integers
BoxMath.solmystical-metaphysical-number-system/hardhatSolidityuint256 — exact integers
PixelMath.solmystical-metaphysical-number-system/hardhatSolidityuint256 — exact integers

Both use pure integer arithmetic — no fixed-point scaling, no SCALE constant. Coefficients, exponents, and evaluation results are raw natural numbers in every case. The hardhat test suite verifies the two produce identical results for every operation.

  • TypeScript APIPolynumber, Multinumber, pow, caretProduct, Pixel, Vexel
  • Solidity APIBoxMath.sol and PixelMath.sol contract functions and struct types