This functionality returns a shared bit [a<b][a < b][a<b] for two shared values [a],[b][a], [b][a],[b]. We use three interval tests: [z]=[b−a<p2],[x]=[a<p2],[y]=[b>p2][z] = [b-a < \frac{p}{2}], [x] = [a < \frac{p}{2}], [y] = [b > \frac{p}{2}][z]=[b−a<2p],[x]=[a<2p],[y]=[b>2p] and output ([z]∧[x])∨([z]∧[y])∨(¬[z]∧[x]∧[y])=[z(x+y)+(1−z)xy]([z] \wedge [x]) \vee ([z] \wedge [y]) \vee(\neg [z] \wedge [x] \wedge [y]) = [z(x+y) + (1-z)xy]([z]∧[x])∨([z]∧[y])∨(¬[z]∧[x]∧[y])=[z(x+y)+(1−z)xy].