This series depends on the one-off patch I just sent to add max(). 1) Fix the broken abs_diff integer built-in. 2) Add clamp for both integer and floating types in a new shared/ dir in order to reduce code duplication and improve maintainability. 3) Move the max() function into the shared/ directory.