Make generated contracts for Floats include NaN.

Closes PR13464.