∸ Monus without Max
Jul. 3, 2024Monus 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
But the most fun method I’ve seen so far goes to Michael Hoppe on Mathematics Stack Exchange with 0√x2-x⋅x