On to Hydro
Tyler Close
tjclose@yahoo.com
Thu, 17 Aug 2000 16:06:49 -0400
Markm wrote:
> Having NaNs be larger than all non-NaNs, including positive
> infinity, is
> surprising too.
Yes, well, I've got a two-dimensional container and
three-dimensional(?) data, so some contortion will have to take place.
You can also think of it as "put them at the end", rather than "make
them larger than everything".
I don't want to divert the conversation too much, but could anyone
quickly tell me why division by 0 is even permitted (instead of
throwing an exception)? Are there algorithms in which it makes sense
to divide a number by zero? If so, why is division of an integer by
zero an exception?
> NaNs, however, are an edge condition.
> Subsets, subtypes,
> preferences, causality -- the universe is rife with partial
> orderings, and
> partial orderings are the more general category.
True, but maybe we need some other concept for them other than "less
than". Less than implies that I can sort. I can't sort with only a
partial ordering. I can't even search with only a partial ordering. I
think you'll have to upgrade the "<" operator to at least strict weak
ordering, though I'll push for total ordering.
I think the solution might be that we don't provide any 'automatic'
comparison operators, and just map them all into method names.
Operator Method Ordering
-------- ------ ---------
< before total or strict weak
<= within partial
> after total or strict weak
>= includes partial
Tyler
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com