struct comparison

Henry Spencer henry at utzoo.uucp
Tue Jul 18 12:04:24 AEST 1989


In article <167 at ssp1.idca.tds.philips.nl> roelof at idca.tds.PHILIPS.nl (R. Vuurboom) writes:
>>It's also not a particularly good idea:  suppose I change to a polar 
>>form, where the representation of a given
>>complex number is not unique?  
>
>Henry, this is cheating :-). If somebody comes along and changes the 
>representation of an int while I'm not looking nobody expects the
>two values (old representation vs new representation) to compare equal.

Not quite what I was getting at.  The point of polar representation is
that member-by-member comparison does not dependably get the right answer!
Equality comparison on polar representation requires range reduction on
the angle first.  This leads again to the need for C++, where you can
define the comparison operation to be arbitrarily complex.
-- 
$10 million equals 18 PM       |     Henry Spencer at U of Toronto Zoology
(Pentagon-Minutes). -Tom Neff  | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.std.c mailing list