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

improve documentation for Integer bits(); negative numbers have "negative bits" #14322

Closed
dandrake opened this issue Mar 20, 2013 · 6 comments
Closed

Comments

@dandrake
Copy link
Contributor

On sage-devel I expressed my unease that negative integers have "negative bits". Strictly speaking, there is some inconsistency here, but the behavior is reasonable -- though it warrants some improved documentation.

Attached patch adds documentation for bits() to explain this.

Component: documentation

Keywords: bits integers

Author: Dan Drake

Reviewer: David Roe

Merged: sage-5.9.beta2

Issue created by migration from https://trac.sagemath.org/ticket/14322

@dandrake
Copy link
Contributor Author

Attachment: bits-doc.patch.gz

@dandrake
Copy link
Contributor Author

comment:1

One unrelated (ahem) bit: I added something to the documentation for denominator, which seems strange for integers -- so we might as well say that it just returns 1 for everything.

@roed314
Copy link
Contributor

roed314 commented Mar 20, 2013

comment:3

Looks good. Adding similar documentation to digits might be nice, but not necessary.

@roed314
Copy link
Contributor

roed314 commented Mar 20, 2013

Reviewer: David Roe

@dandrake
Copy link
Contributor Author

comment:4

Replying to @roed314:

Looks good. Adding similar documentation to digits might be nice, but not necessary.

There's an example in the digits documentation which shows the same kind of thing, so I thought I'd leave it for now.

Thanks for the quick review!

@jdemeyer
Copy link

Merged: sage-5.9.beta2

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

No branches or pull requests

3 participants