On Wed, Jun 17, 2009 at 6:02 AM, Fredrik Johansson<[email protected]> wrote: > > On Jun 3, 9:12 am, casevh <[email protected]> wrote: > >> Other than bug-fixes for gmpy, should we move all future development >> to a Cython-based wrapper? > > +1 > >> I do not like the GMP mpf type. Should gmpy try to support MPFR? > > (You could use the future mpmath Cython mpf type, which will provide > correct rounding without MPFR's limitations.) > > How would you feel about extending gmpy a bit to not just wrap GMP/ > MPIR? > > SymPy is getting a Cython core (if Ondrej finds time to work on this). > Also, mpmath is getting a Cython backend (I'm working on this). Both > will need fast integers, rationals, and arbitrary-precision floats. > One option would be to do a single core library for the number types, > extending (rather rewriting, if it's going to be done in Cython) gmpy. > > Done right, mpmath and SymPy should be able to subclass directly from > the basic types (and/or use them with appropriately chosen context > objects). For example, mpq(2,3) ** mpq(1,2) could be implemented to > call mpq._irrational_exponentiation(x,y) which by default would raise > NotImplementedError; mpmath would override this to return a numerical > approximation, and SymPy would override it to return a symbolic > object. > > We could provide both a pure Python reference implementation (based on > mpmath and SymPy cores, and my module libarith.py), for default use by > mpmath and SymPy, and a fast Cython version wrapping MPIR/GMP. > > This could potentially avoid duplication of features (and the need for > multi-way coercion code between libraries).
Yes, there is only one problem ---- Cython doesn't seem to work that efficiently in the pure Python mode yet: http://codespeak.net/pipermail/cython-dev/2009-June/006086.html and I don't know how difficult it will be to get it fixed, but from the ticket maybe soon. :) But there might also be some other bugs, that pop up, as the pure python mode is not really that tested. Fredrik, will you write (and maintain!) the cython and python versions separately, or will you use the pure python mode? Ondrej --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---
