Hacker News new | ask | show | jobs
by layer8 1409 days ago
If you have abs(), you can use the following as a fallback:

min(a, b) = (a + b - abs(a − b)) / 2

max(a, b) = (a + b + abs(a − b)) / 2