Issue 4122 in sympy: Egyptian fractions

2013-12-07 Thread sympy
Status: New Owner: Labels: Type-Enhancement Priority-Medium NumberTheory New issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Input a rational between 0 and 1, receive a list of the denominators of an Egyptian fraction expansion

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-08 Thread sympy
Comment #1 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 By greedy do you mean the Graham and Jewett algorithm as given in this article http://en.wikipedia.org/wiki/Egyptian_fraction -- You received this message because this p

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-09 Thread sympy
Comment #2 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 No. The greedy algorithm takes the largest unit fraction less than or equal to the target fraction at each iteration (see https://en.wikipedia.org/wiki/Greedy_algorithm_for

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-09 Thread sympy
Comment #3 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Is it fine if I start working on this ? -- You received this message because this project is configured to send all issue notifications to this address. You may adjust y

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-09 Thread sympy
Comment #4 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Sure! -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: h

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-09 Thread sympy
Comment #5 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Sorry, deleted my comment , my original comment was "Is it fine if I start working on this ". :) -- You received this message because this project is configured to send

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-09 Thread sympy
Comment #6 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Go ahead. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences a

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-09 Thread sympy
Comment #7 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 And, since the file I attached to my earlier email isn't showing up here, I'm attaching it specifically to this thread... Attachments: egypt.py 4.3 KB -- You r

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-09 Thread sympy
Comment #8 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 I have now added two functions to the file to compute Engel expansions (Egyptian expansions in which each denominator is a multiple of the previous). I'm attaching the

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-09 Thread sympy
Comment #9 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Accidentally cut out a comment block describing Engel expansions more precisely: # Engel expansions are Egyptian fraction expansions such that each denominator # is

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-10 Thread sympy
Comment #10 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 I have implemented the functions as you had suggested , but instead of Rational(7,12).egypt.greedy() , I have kept them as Rational(7,12).egypt_greedy(), Rational(7,12)

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-10 Thread sympy
Comment #11 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Use whatever you want from my files. I lay no claim to any of it. Re. Test files... I like to do my own testing, but if you want to supply them anyway, go ahead. -- Y

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-10 Thread sympy
Comment #12 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Here is the pull request https://code.google.com/p/sympy/issues/detail?id=4122 -- You received this message because this project is configured to send all issue notif

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-10 Thread sympy
Comment #13 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Here is the pull request https://github.com/sympy/sympy/pull/2663 -- You received this message because this project is configured to send all issue notifications to this

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-10 Thread sympy
Comment #14 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Looks good. Go for it! -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notificatio

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-10 Thread sympy
Comment #15 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Thanks !!! -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-12 Thread sympy
Comment #16 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 I've finished coding up the other algorithms I mentioned. Turns out the method using Farey sequences produces results identical to the Golomb algorithm---the Golomb al

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-12 Thread sympy
Comment #17 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Thanks !! -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-18 Thread sympy
Comment #18 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Hi, Sympy requires me to supply test cases for the modules I write. Right now, I have added tests which add the resulting egyptian fractions and test the input(i have a

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-18 Thread sympy
Comment #19 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Also another thing I have noticed is for rational numbers having large numerators & denominators , takenouchi gives MemoryError & Graham Jewett takes a lot of time. I g

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-18 Thread sympy
Comment #20 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Sorry for taking so long to get back to you on this � I've been having issues with my computer. They're pretty much resolved by now. Given a fraction *p/q* in lowest term

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-19 Thread sympy
Comment #21 on issue 4122 by lucasbro...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Limits on the greedy / Fibonacci-Sylvester algorithm: * Given *p/q* in lowest terms, generates an expansion of maximum length *p*. Even as the numerators get large, the nu

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-24 Thread sympy
Comment #22 on issue 4122 by asmeu...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 This is good information to put in the docstring. -- You received this message because this project is configured to send all issue notifications to this address. You may

Re: Issue 4122 in sympy: Egyptian fractions

2013-12-24 Thread sympy
Comment #23 on issue 4122 by faisal.i...@gmail.com: Egyptian fractions http://code.google.com/p/sympy/issues/detail?id=4122 Thanks for this !! -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification pre