A circuit for comparing and selecting NaN inputs is disclosed. Each NaN input is transformed by appending a sign bit to the end of a significand. In one particular embodiment, the inverse of the sign bit is appended to the significand. Accordingly, the transformed inputs include the significand and a least significant bit which indicates whether the input was positive or negative. The transformed inputs are compared by a comparator circuit such as a carry tree. An output of the carry tree controls a multiplexer which selects a first input if a first transformed input is greater than or equal to a second transformed input, and selects a second input if the second transformed input is greater than the first transformed input.
展开▼