Merge saturate_cast function to provide more scalability.