Skip to content

add limit_denominator method with tests#103

Open
msalib wants to merge 1 commit into
rust-num:masterfrom
msalib:master
Open

add limit_denominator method with tests#103
msalib wants to merge 1 commit into
rust-num:masterfrom
msalib:master

Conversation

@msalib

@msalib msalib commented Apr 7, 2022

Copy link
Copy Markdown

Python's fractions module in the standard library implements a rational type and provides a really handy limit_denominator method. I've implemented it here along with some tests.

This PR should address #99 .

@cmpute

cmpute commented Apr 8, 2022

Copy link
Copy Markdown

FWIW, I would suggest creating a uniform method/trait to approximate numbers (as I proposed in #100), which should work for both float to rational and rational to rational conversions.

@cuviper

cuviper commented Apr 26, 2022

Copy link
Copy Markdown
Member

I appreciate that you cited your source, but I'm also uncomfortable with the license implications there. I think language translations do still generally count as derived works. I'm not really sure what we need to do about that...

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.

3 participants