What does “compares less than zero” mean?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







-2















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?










share|improve this question



























  • It’s more or less understandable in context as meaning “evaluates to less than zero”, but it’s certainly not something I’ve ever seen before. It may be more or less conventional jargon in C++-speak, but I don’t remember coming across it before. Then again, I don’t know the first thing about C++, so I wouldn’t be likely to know that.

    – Janus Bahs Jacquet
    Nov 26 '17 at 18:50











  • Thank you!! I am so glad I asked! Can you give me a definitive answer based exclusively on English grammar?

    – q-l-p
    Nov 26 '17 at 18:57






  • 1





    ... English grammar often tends to be in dispute rather than able to provide definitive answers. Different registers accept different usages.

    – Edwin Ashworth
    Nov 26 '17 at 22:57











  • The language here is a bit odd. A better explanation can be found at blog.tartanllama.xyz/spaceship-operator. The operator does: (a <=> b) < 0 //true if a < b, or (a <=> b) > 0 //true if a > b, or (a <=> b) == 0 //true if a is equal/equivalent to b. You compare the result of the spaceship operator to 0, but I don't think that it's natural to say it "compares <0". That sounds like bad documentation.

    – jimm101
    May 24 at 19:01




















-2















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?










share|improve this question



























  • It’s more or less understandable in context as meaning “evaluates to less than zero”, but it’s certainly not something I’ve ever seen before. It may be more or less conventional jargon in C++-speak, but I don’t remember coming across it before. Then again, I don’t know the first thing about C++, so I wouldn’t be likely to know that.

    – Janus Bahs Jacquet
    Nov 26 '17 at 18:50











  • Thank you!! I am so glad I asked! Can you give me a definitive answer based exclusively on English grammar?

    – q-l-p
    Nov 26 '17 at 18:57






  • 1





    ... English grammar often tends to be in dispute rather than able to provide definitive answers. Different registers accept different usages.

    – Edwin Ashworth
    Nov 26 '17 at 22:57











  • The language here is a bit odd. A better explanation can be found at blog.tartanllama.xyz/spaceship-operator. The operator does: (a <=> b) < 0 //true if a < b, or (a <=> b) > 0 //true if a > b, or (a <=> b) == 0 //true if a is equal/equivalent to b. You compare the result of the spaceship operator to 0, but I don't think that it's natural to say it "compares <0". That sounds like bad documentation.

    – jimm101
    May 24 at 19:01
















-2












-2








-2








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?










share|improve this question
















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?







grammaticality meaning-in-context terminology






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 24 at 17:35







q-l-p

















asked Nov 26 '17 at 17:53









q-l-pq-l-p

1715 bronze badges




1715 bronze badges
















  • It’s more or less understandable in context as meaning “evaluates to less than zero”, but it’s certainly not something I’ve ever seen before. It may be more or less conventional jargon in C++-speak, but I don’t remember coming across it before. Then again, I don’t know the first thing about C++, so I wouldn’t be likely to know that.

    – Janus Bahs Jacquet
    Nov 26 '17 at 18:50











  • Thank you!! I am so glad I asked! Can you give me a definitive answer based exclusively on English grammar?

    – q-l-p
    Nov 26 '17 at 18:57






  • 1





    ... English grammar often tends to be in dispute rather than able to provide definitive answers. Different registers accept different usages.

    – Edwin Ashworth
    Nov 26 '17 at 22:57











  • The language here is a bit odd. A better explanation can be found at blog.tartanllama.xyz/spaceship-operator. The operator does: (a <=> b) < 0 //true if a < b, or (a <=> b) > 0 //true if a > b, or (a <=> b) == 0 //true if a is equal/equivalent to b. You compare the result of the spaceship operator to 0, but I don't think that it's natural to say it "compares <0". That sounds like bad documentation.

    – jimm101
    May 24 at 19:01





















  • It’s more or less understandable in context as meaning “evaluates to less than zero”, but it’s certainly not something I’ve ever seen before. It may be more or less conventional jargon in C++-speak, but I don’t remember coming across it before. Then again, I don’t know the first thing about C++, so I wouldn’t be likely to know that.

    – Janus Bahs Jacquet
    Nov 26 '17 at 18:50











  • Thank you!! I am so glad I asked! Can you give me a definitive answer based exclusively on English grammar?

    – q-l-p
    Nov 26 '17 at 18:57






  • 1





    ... English grammar often tends to be in dispute rather than able to provide definitive answers. Different registers accept different usages.

    – Edwin Ashworth
    Nov 26 '17 at 22:57











  • The language here is a bit odd. A better explanation can be found at blog.tartanllama.xyz/spaceship-operator. The operator does: (a <=> b) < 0 //true if a < b, or (a <=> b) > 0 //true if a > b, or (a <=> b) == 0 //true if a is equal/equivalent to b. You compare the result of the spaceship operator to 0, but I don't think that it's natural to say it "compares <0". That sounds like bad documentation.

    – jimm101
    May 24 at 19:01



















It’s more or less understandable in context as meaning “evaluates to less than zero”, but it’s certainly not something I’ve ever seen before. It may be more or less conventional jargon in C++-speak, but I don’t remember coming across it before. Then again, I don’t know the first thing about C++, so I wouldn’t be likely to know that.

– Janus Bahs Jacquet
Nov 26 '17 at 18:50





It’s more or less understandable in context as meaning “evaluates to less than zero”, but it’s certainly not something I’ve ever seen before. It may be more or less conventional jargon in C++-speak, but I don’t remember coming across it before. Then again, I don’t know the first thing about C++, so I wouldn’t be likely to know that.

– Janus Bahs Jacquet
Nov 26 '17 at 18:50













Thank you!! I am so glad I asked! Can you give me a definitive answer based exclusively on English grammar?

– q-l-p
Nov 26 '17 at 18:57





Thank you!! I am so glad I asked! Can you give me a definitive answer based exclusively on English grammar?

– q-l-p
Nov 26 '17 at 18:57




1




1





... English grammar often tends to be in dispute rather than able to provide definitive answers. Different registers accept different usages.

– Edwin Ashworth
Nov 26 '17 at 22:57





... English grammar often tends to be in dispute rather than able to provide definitive answers. Different registers accept different usages.

– Edwin Ashworth
Nov 26 '17 at 22:57













The language here is a bit odd. A better explanation can be found at blog.tartanllama.xyz/spaceship-operator. The operator does: (a <=> b) < 0 //true if a < b, or (a <=> b) > 0 //true if a > b, or (a <=> b) == 0 //true if a is equal/equivalent to b. You compare the result of the spaceship operator to 0, but I don't think that it's natural to say it "compares <0". That sounds like bad documentation.

– jimm101
May 24 at 19:01







The language here is a bit odd. A better explanation can be found at blog.tartanllama.xyz/spaceship-operator. The operator does: (a <=> b) < 0 //true if a < b, or (a <=> b) > 0 //true if a > b, or (a <=> b) == 0 //true if a is equal/equivalent to b. You compare the result of the spaceship operator to 0, but I don't think that it's natural to say it "compares <0". That sounds like bad documentation.

– jimm101
May 24 at 19:01












1 Answer
1






active

oldest

votes


















1














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.






share|improve this answer


























  • "This property" meaning that (by definition) comparison of this object with some number, at least with 0, is a valid operation with the value "true" in the defined cases.

    – Bobby J
    May 24 at 19:49














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "97"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fenglish.stackexchange.com%2fquestions%2f419939%2fwhat-does-compares-less-than-zero-mean%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














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.






share|improve this answer


























  • "This property" meaning that (by definition) comparison of this object with some number, at least with 0, is a valid operation with the value "true" in the defined cases.

    – Bobby J
    May 24 at 19:49
















1














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.






share|improve this answer


























  • "This property" meaning that (by definition) comparison of this object with some number, at least with 0, is a valid operation with the value "true" in the defined cases.

    – Bobby J
    May 24 at 19:49














1












1








1







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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










answered May 24 at 18:47









GEdgarGEdgar

15k2 gold badges24 silver badges47 bronze badges




15k2 gold badges24 silver badges47 bronze badges
















  • "This property" meaning that (by definition) comparison of this object with some number, at least with 0, is a valid operation with the value "true" in the defined cases.

    – Bobby J
    May 24 at 19:49



















  • "This property" meaning that (by definition) comparison of this object with some number, at least with 0, is a valid operation with the value "true" in the defined cases.

    – Bobby J
    May 24 at 19:49

















"This property" meaning that (by definition) comparison of this object with some number, at least with 0, is a valid operation with the value "true" in the defined cases.

– Bobby J
May 24 at 19:49





"This property" meaning that (by definition) comparison of this object with some number, at least with 0, is a valid operation with the value "true" in the defined cases.

– Bobby J
May 24 at 19:49


















draft saved

draft discarded




















































Thanks for contributing an answer to English Language & Usage Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fenglish.stackexchange.com%2fquestions%2f419939%2fwhat-does-compares-less-than-zero-mean%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum

He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

Bunad