absdif() wrapped as static function