>I'm not convinced NaN gives us anything useful, especially given how
>badly it breaks sorting. I've been digging into that code a little,
>and it's not going to be pretty. It strikes me as wrong to embed type
>specific info into the generic sorting routines.
>
>So, anyone have any ideas what NaN would be useful for? Especially given
>we have NULL available, which most (non DB) numeric applications don't.
>
>Ross
Just a wild guess, NaN could be used to indicated invalid numeric
data. However, this seems odd because it should have been checked prior to
being put in the DB.
NULL is no value, +/- infinity could be just that or out of range, unless
you want NaN to be out of range. Depending on your scheme for
representation you could take an out of range value and store it as +/i
infinity.
These are just suggestions.
Thomas