Summary: This diff improves the precision of the mod operator. For example, result of x % c (when x>=0 and c>0) is (before) [0, c-1] (after) [0, min(c-1,x)] Reviewed By: ezgicicek Differential Revision: D16518578 fbshipit-source-id: a68660ee7