Skip to content
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

Add index entries for ones' and two's complements #970

Merged
merged 3 commits into from Nov 12, 2016

Conversation

jfbastien
Copy link
Contributor

No description provided.

@@ -3899,6 +3899,8 @@
in~\ref{conv.prom}.}
A synonym for integral type is
\indextext{integer~type}%
\indextext{complement!ones'}%
\indextext{complement!two's}%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not also "signed magnitude"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean a third index entry?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, since it appears that you are indexing the various possible representations of signed integers here. So it would be strange to index only some of them, don't you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the index entry not be "complex" then? Maybe change it to "Signed integer representation", and have sub-entries "Ones' complement", "Two's complement", and "Signed magnitude"?

Are there other places where "signed magnitude" should be indexed, or other representations that should be indexed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a) yes to the first suggestion, b) consider then also adding "see also"s to the other uses if appropriate, and c) I can't think of any other place where we should index "signed magnitude", but that may just be my lack of creativity. In any case we can always add more index entries later.

@jfbastien
Copy link
Contributor Author

I updated this patch as suggested.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 10, 2016

Thanks, that looks nice.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 10, 2016

@AlisdairM: What's your opinion as the index expert?

@@ -1148,6 +1148,7 @@
\pnum
\returns Atomically, the value pointed to by \tcode{object} or by \tcode{this} immediately before the effects.

\indextext{signed integer representation!two's complement}%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think the index entries are better placed after the paragraph:

\pnum
\indextext{...}%
Real text starts here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@tkoeppe tkoeppe merged commit 947e6a6 into cplusplus:master Nov 12, 2016
@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 12, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants