Use Java signum to avoid allocation of RichInt.