Happy Happy Joy Joy (was: On to Hydro)

Bill Frantz frantz@communities.com
Mon, 21 Aug 2000 16:02:48 -0700


At 03:47 PM 8/21/00 -0700, Mark S. Miller wrote:
>At 03:36 PM 8/21/00 , Bill Frantz wrote:
>>I'm tempted to say that the only use for a container of garbage is to be
>>removed by the trash collectors.  :-)
>>
>>NaN is Not a number.  It is an indication that your calculation produced
>>garbage.  You shouldn't expect it to behave like a number.
>
>But it does exist and have a well defined behavior.  What would you have 
>these containers do when asked to store and retrieve NaNs?  Remember, the 
>containers don't know about numbers, only things with the properties needed 
>for these containers to hold them.

Since NaN is the result of a computation gone bad, where it was too
expensive to check every step, I think the correct answer is to throw an
exception.

Cheers - Bill