Monus


Jul. 3, 2024

∸ Monus without Max

Monus is an fun operator, its symbol is a dot above a minus; . Monus is truncated subtraction, or in clearer terms, subtraction where the result stops at zero, eg. if you perform 5 ∸ 10, you get 0 instead of -5. But 5 – 3 will result in 2 as normal.

The Wikipedia article for Monus describes a few methods to perform the operation which involve conditionals or abstract functions like Max(x, 0) but my preferred method is the simple (x+|x|)/2

More…