Std.Arithmetic

View source →

Arithmetic interfaces, split by operation rather than one monolithic Num (spec §2.3): motivated by Std.Measurements (Duration has add/sub/scale but no Duration * Duration — measurements.cure:84-90).

`%` (remainder) is Int-specific and does NOT live on Divisible — Float has no clean total modulo on AtomVM. It is pinned as an Int-only method on its own Integral(t) interface; only Int conforms. Float never implements `%`.

ADDITIVE and DORMANT: operators (+, -, *, /, %) do NOT route through these interfaces yet — build_binop still hardcodes the primitive by operand kind. The methods are callable by their backtick operator name (e.g. `+`(2, 3)). Operator dispatch rewiring is a later task. Types supporting addition, subtraction, and negation.