<div dir="ltr"><div class="gmail_extra">Another option is to make a new type, not sure what to call it but I’ll use “Num” for now, that is essentially the same as Double except it does not represent NaN. After all, why should a numeric type ever be “not a number”, and what sort of name is “Double” anyway except as a hold-over from legacy standards?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Then people who really need IEEE semantics can keep using Double with all its quirks. But everyone else who just wants a floating-point value can use Num, and if they need to represent NaN they can use an Optional&lt;Num&gt;. Operations which would produce NaN on Double will simply trap when done on Num.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Nevin</div></div>