@jaffathecake had a problem of truncation and posted to Twitter his calculation. The gist of his attack was min( max( num, min ), max) yet refused to add any annotation.