I would propose NonNanF32
(see threads like [Pre-RFC?] NonNaN type), since ±∞ really don't cause the same problems that NAN
s do. (Including the infinities is still Eq
+Ord
, for example.) And things like log(0)
=> -∞
and exp(-∞)
=> 0
are quite handy.
2 Likes