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

Remarks of Melchoir via Reddit #1

Open
velnias75 opened this issue Oct 29, 2015 · 1 comment
Open

Remarks of Melchoir via Reddit #1

velnias75 opened this issue Oct 29, 2015 · 1 comment
Assignees

Comments

@velnias75
Copy link
Owner

From Reddit:

Very cool!

For documentation: It would be good to describe more explicitly the range of storage types that are expected to work. Can I use polynomials and get rational functions? Can I use Gaussian integers and get Gaussian rationals? Ideally, T would not need to have comparison methods as long as I never reference Rational's comparison methods, but maybe they're needed internally for other purposes.

If the above are meant to be supported, it would be good to see a couple of test cases, too. Hopefully, the exotic storage types wouldn't have to be fully fleshed out if they're just for testing.

Also for test cases: Make sure you've handled the most negative value M of a signed binary integer type, since -M = M, which might cause trouble in lots of places.

Back to docs, it would be good to describe what it means to support GMP. What does one gain by using a Rational of GMP integers, rather than a native GMP rational?

On the implementation side, I don't think you need to declare your own [copy, move] [constructor, assignment operator]s or destructor. It looks like your implementations aren't doing anything special.

@velnias75
Copy link
Owner Author

removed copy/move constructor and assignment operator in commit 3162404

Destructor is left, because of inlining issues with GMP.

@velnias75 velnias75 self-assigned this Oct 30, 2015
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

No branches or pull requests

1 participant