OK, I posted pull request #2499. https://github.com/sympy/sympy/pull/2499
Heiner Am Mittwoch, 2. Oktober 2013 17:14:16 UTC+2 schrieb Ondřej Čertík: > > On Wed, Oct 2, 2013 at 7:42 AM, Heiner Kirchhoffer > <heiner.ki...@gmail.com <javascript:>> wrote: > > I just realised that the this issue is related to pull request #2481 > > (https://github.com/sympy/sympy/pull/2481). > > The test failures that are currently present in #2481 are due to the > issue > > described here. > > > > The proposed bug fix would thus be necessary for #2481 as well. > > > > How to proceed? Shall the fix be added to #2481? > > You can checkout Mateusz's branch from #2481, and then simply take his > patches > and put it in your own branch, and then fix the failures with > additional patches. > Then send a new PR. > > Ondrej > > > > > Best regards, > > Heiner > > > > > > Am Mittwoch, 2. Oktober 2013 03:42:04 UTC+2 schrieb Aaron Meurer: > >> > >> The PythonRational is the rational type internal to the polys module > >> when the Python ground types are used. It is designed to be fast. > >> Rational on the other hand is designed to play well with the rest of > >> SymPy. You can get even faster, by the way, if you install gmpy. > >> > >> But yeah, you are right, it would be better to use the Rational > >> version of __int__ in PythonRational. Please submit a pull request > >> with your fix (and also add a test for it). > >> > >> Aaron Meurer > >> > >> > >> On Tue, Oct 1, 2013 at 9:20 AM, Heiner Kirchhoffer > >> <heiner.ki...@gmail.com> wrote: > >> > Hello, > >> > > >> > When using the branch "fix-root-isolation-bounds" of repository > >> > "https://github.com/mattpap/sympy.git", the following code produces > an > >> > OverflowError: > >> > > >> > a = x**45 - 45*x**44 + 990*x**43 - 14190*x**42 + 148995*x**41 - > >> > 1221759*x**40 + 8145060*x**39 - 45379620*x**38 + 215553195*x**37 - > >> > 886163135*x**36 + 3190187286*x**35 - 10150595910*x**34 + > >> > 28760021745*x**33 - > >> > 73006209045*x**32 + 166871334960*x**31 - 344867425584*x**30 + > >> > 646626422970*x**29 - 1103068603890*x**28 + 1715884494940*x**27 - > >> > 2438362177020*x**26 + 3169870830126*x**25 - 3773655750150*x**24 + > >> > 4116715363800*x**23 - 4116715363800*x**22 + 3773655750150*x**21 - > >> > 3169870830126*x**20 + 2438362177020*x**19 - 1715884494940*x**18 + > >> > 1103068603890*x**17 - 646626422970*x**16 + 344867425584*x**15 - > >> > 166871334960*x**14 + 73006209045*x**13 - 28760021745*x**12 + > >> > 10150595910*x**11 - 3190187286*x**10 + 886163135*x**9 - > 215553195*x**8 + > >> > 45379620*x**7 - 8145060*x**6 + 1221759*x**5 - 148995*x**4 + > 14190*x**3 - > >> > 990*x**2 + 46*x - 1 > >> > > >> > b = x**46 - 46*x**45 + 1035*x**44 - 15180*x**43 + 163185*x**42 - > >> > 1370754*x**41 + 9366819*x**40 - 53524680*x**39 + 260932815*x**38 - > >> > 1101716330*x**37 + 4076350421*x**36 - 13340783196*x**35 + > >> > 38910617655*x**34 > >> > - 101766230790*x**33 + 239877544005*x**32 - 511738760544*x**31 + > >> > 991493848554*x**30 - 1749695026860*x**29 + 2818953098830*x**28 - > >> > 4154246671960*x**27 + 5608233007146*x**26 - 6943526580276*x**25 + > >> > 7890371113950*x**24 - 8233430727600*x**23 + 7890371113950*x**22 - > >> > 6943526580276*x**21 + 5608233007146*x**20 - 4154246671960*x**19 + > >> > 2818953098830*x**18 - 1749695026860*x**17 + 991493848554*x**16 - > >> > 511738760544*x**15 + 239877544005*x**14 - 101766230790*x**13 + > >> > 38910617655*x**12 - 13340783196*x**11 + 4076350421*x**10 - > >> > 1101716330*x**9 + > >> > 260932815*x**8 - 53524680*x**7 + 9366819*x**6 - 1370754*x**5 + > >> > 163185*x**4 - > >> > 15180*x**3 + 1035*x**2 - 47*x + 1 > >> > > >> > p = a * b > >> > > >> > r = sympy.intervals(p) > >> > > >> > > >> > > >> > Without using the branch "fix-root-isolation-bounds", an error > related > >> > to > >> > the issue addressed in "fix-root-isolation-bounds" would happen first > >> > and > >> > the current error wouldn't happen at all. > >> > > >> > The problem can be reduced to: > >> > > >> > r = sympy.polys.domains.PythonRational( 1, > >> > > >> > > 3316158518186977171087283760642741158699936149735704467159471849921418683482035763477878926564345847729145083728966646356210626353328840324989147544629059746554141479347263264595425816446455256534872353644097455203319930608430165174159005378955830171087831965898486080345430665055936553487340789901656166618033483630075818541056) > > > >> > > >> > r = int( r ) > >> > > >> > > >> > A "PythonRational" with large denominator is converted to int. > >> > > >> > It is not clear to me why there exists a class PythonRational and a > >> > class > >> > Rational. > >> > However, if the problem should be fixed inside of PythonRational, > >> > shouldn't > >> > the __int__ function of PythonRational be exactly like the one of > >> > Rational? > >> > > >> > See: > >> > > >> > > https://github.com/HeinerKirchhoffer/sympy/commit/5ad7031f1b3688780b4b44ec433cf0a396f50275 > > >> > > >> > Best regards, > >> > Heiner > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "sympy" group. > >> > To unsubscribe from this group and stop receiving emails from it, > send > >> > an > >> > email to sympy+un...@googlegroups.com. > >> > To post to this group, send email to sy...@googlegroups.com. > >> > Visit this group at http://groups.google.com/group/sympy. > >> > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "sympy" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to sympy+un...@googlegroups.com <javascript:>. > > To post to this group, send email to sy...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/sympy. > > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.