New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uniform "ones' complement" and "two's complement" #619
Conversation
"one's complement" is inconsistent with the C standard. "1's complement" and "2's complement" are also inconsistent.
Is the inconsistency with the C++ standard enough to justify that the C On Saturday, February 13, 2016, Kazutoshi SATODA notifications@github.com
|
@sigfpe I think it might be, for example, if the intent of the word in |
Should the modifications be applied to the C standards draft instead?-------- Original message --------From: Kazutoshi SATODA notifications@github.com Date: 2/13/2016 8:06 AM (GMT-08:00) To: cplusplus/draft draft@noreply.github.com Cc: sigfpe sig.fpe@axiomatics.org Subject: Re: [draft] Uniform "ones' complement" and "two's complement" (#619) question was to be compatible with the predecessor in C++. — |
@sigfpe I personally don't think so. I believe my above comments are |
You asserted they are enough.
|
@sigfpe Sorry if I made the confusion. But no, I didn't. |
It looks like "one's complement" is more common than "ones' complement" by a fairly large factor: However, I'm inclined to take TAOCP as authority here, and I buy the argument that this is really the result of taking "ones's complement" and applying the usual English rule of Xs's -> Xs'. |
Uniform "ones' complement" and "two's complement", per the C standard and Knuth.
"one's complement" is inconsistent with the C standard.
"1's complement" and "2's complement" are also inconsistent.
FYI, I found that there was a lengthy discussion on Wikipedia at 2011
about "one's complement". The C++ standard was mentioned as a notable
use of "one's complement". There seems no consensus in the discussion,
but the main article has been settled as "ones' complement" for years
since then.
https://en.wikipedia.org/wiki/Ones'_complement
https://en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_Computer_science/Archive_10#Ones.27_complement_or_one.27s_complement.3F
For me, a quote from "Art of Computer Programming, Volume 2" by
Donald E. Knuth is convincing.
https://books.google.com/books?id=Zu-HAwAAQBAJ&pg=PT343
While it is still debatable in general, I think inconsistency with the
C standard is enough for the C++ standard to justify this change.