What does "compares less than zero" mean?

I have posted a question on Stack Overflow about a curious usage of the verb "to compare" in a paper I read:

The expression a <=> b returns an object that compares <0 if a < b, compares >0 if a > b, and compares ==0 if a and b are equal/equivalent.

Translation:

The expression blah-blah returns an object that compares less than zero if blah-blah...

Does this sentence make sense in English? Is this some kind of jargon used by programmers? Is it even grammatical and makes any sense? If so, what exactly does it mean?


P compares less than zero means: evaluating the statement "P < 0" returns "true". It could be that the "object" P is a number which is less than zero, or it could be that it is not a number at all but some other type of object which (by convention) has this property.