Hi, Here's a couple of questions that have occurred to me as I tried to make fraction fields of mpolynomials tolerable to work with.
1) In the "reduce" method in the file fraction_field_element.py (line 72), we call quo_rem to divide the gcd out of the numerator and denominator. Now, by definition the remainder should be 0 so we throw out the remainder. However, it seems to me that it should be faster to give the base_ring the information that we don't care about the remainder by using the "//" operator (which calls __floordiv__). 2) Ok, so I think #1 is obviously correct and I tried it to see if it made a speed difference. It did, but the wrong way -- __floordiv__ is slow for polynomial_integer_dense_ntl.pyx and the docstring explains that we don't know how this is defined. I'm not sure what David Harvey's exact questions are, but I think we should get it figured out. An obvious fact that I'd believe should hold is that: f.quo_rem(g)[0] == f//g That seems to remove any ambiguity. 3) What does quo_rem, __floordiv__ mean for mpolynomials? Magma's analog of __floordiv__ throws an error if the division doesn't come out exactly. I'm struggling to come up with an example, but it seems like the result of a __floordiv__ could be quite ambiguous at times. -- Joel --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---