12 // A NaN gate! Computes `Inf - max(x+y, -Inf)`.
13 // See http://tom7.org/nand/
22 {`ANYF, `ANAN}, {`ANAN, `ANYF}: Y = `PINF;
23 {`PINF, `NINF}, {`NINF, `PINF}: Y = `PINF;
24 {`ANYF, `PINF}, {`PINF, `ANYF}: Y = `PNAN;
30 // Convert a bit into an fp3
31 module bit_to_fp3(input A, output [2:0] Y);
32 assign Y = A ? `PNAN : `PINF;
35 // Convert an fp3 into a bit
36 module fp3_to_bit(input [2:0] A, output reg Y);
39 `PNAN, `NNAN: Y = 1'b1;