On Thu, Aug 10, 2006 at 03:40:11AM -0000, Andrew - Supernews wrote: > On 2006-08-10, Stephen Frost <[EMAIL PROTECTED]> wrote: > >> Yeah, because numeric_cmp says that 1.0 and 1.00 are equal (what else > >> could it say? "less" and "greater" are surely wrong). So you need to > > It could say "not equal" pretty reasonably as the scale is > > different. > The comparison function must be trichotomous, that is the possible results > are "equal", "greater", and "less". There is no other "not equal" result.
And it is wrong - because they are equal. But 1.0 is also equal to 1.01. We shouldn't go there. :-) Cheers, mark -- [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED] __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them... http://mark.mielke.cc/ ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend