I think you'll need to treat `Double.NaN` here. Reuse `Constant#equalHashValue`.