Deterministic Fixed Point Arithmetic | Dweve Numerus

Numerus: deterministic fixed-point, decimal and integer arithmetic in Rust; same bits under a declared execution contract. Publishing in round two.

What is Dweve Numerus?

Numerus is a deterministic arithmetic library in Rust. It uses binary fixed-point, base-ten decimal and integer types so the same calculation produces the same bits on every supported machine under a declared execution contract. Precision, rounding policy and overflow behaviour are chosen before the first operation and recorded with the result. Repository access is currently requested through Dweve's community.

  • The declared fixed-point or decimal contract keeps the arithmetic integer-only; conversion across a floating-point boundary is explicit.
  • An operation can carry its inputs, result, flags, error bounds and source location for a bit-for-bit replayable record.

Choose the audience that matches your question

The page contains three selectable readings of the same subject.

For consumers

Numerus is a library for calculations that must come out the same every time. Your bill, your meter reading and a dose on a ward are all sums. It works in whole numbers, so the answer is the same on a phone, on a server in another country and on a card reader nobody has updated in years.

For businesses

Numerus is a deterministic fixed-point arithmetic library in Rust under Apache-2.0. The precision, rounding point and retention period are chosen before the calculation, recorded with the reasoning, and rerun on a reviewer's own machine to the last digit.

For engineers

Numerus is a Rust library for arithmetic that has to survive review. Precision and the rounding policy are chosen before the calculation runs, properties are proven over a range you declare, and every operation can carry the line that produced it. Apache-2.0, publishing in the second round of the foundation release programme.