On Fri, Mar 27, 2020 at 4:19 PM Ondřej Čertík <[email protected]> wrote: > > Hi, > > I am looking for students again this year for any related ideas: > > https://github.com/sympy/sympy/wiki/GSoC-2020-Ideas#sympy---fortran-code-generation-and-jit > > The ideas are from last year, and we made good progress on them last year. > There is plenty still to do. Here are some ideas in random order and you are > welcome to propose your own idea. If anybody is interested in applying to any > of those, let me know and I am happy to help brainstorm more and review the > application. > > Ondrej > > 1) Implement a module for efficient rational function approximation with code > generation to Fortran and C. It would accept a SymPy expression as a function > of one variable and it would output an efficient rational function > approximation. Here is an example how the final function looks like for a > modified Bessel function of half integer order (this one was written by hand): > > https://github.com/certik/hfsolver/blob/b4c50c1979fb7e468b1852b144ba756f5a51788d/src/special_functions.f90#L371
I have some code that computes the Chebyshev rational approximation of exp(-t) on [0, infinity) using the Remez algorithm here https://github.com/ergs/transmutagen/blob/master/transmutagen/cram.py. It uses SymPy and mpmath to compute an arbitrary number of digits of the approximation to an arbitrary degree. We also have a work-in-progress paper (never published) describing it in more detail which I can share if anyone is interested. Extending this to work with arbitrary functions would be very difficult, and would be a project all of its own (nothing to do with Fortran or code generation). One should also look at the chebfun MatLab package (which is open source). > > 2) Scan Fortran source code using LFortran and extract all expressions to > SymPy. Allow to use SymPy to transform those expressions, such as simplify(). Wasn't this implemented last year? > > 3) Related to the previous point: Optimize floating point expressions: > https://github.com/sympy/sympy/wiki/GSoC-2020-Ideas#optimize-floating-point-expressions > and integrate with Fortran. This is also a very difficult project, and would have enough difficult work on its own to not need to be related directly to Fortran or code generation (although that would obviously be the motivation for it). Much of what would be required to make this work is an open research question. Aaron Meurer > > 4) General improvements to Fortran parser / generator to / from SymPy. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/e8d003cd-4784-40ef-b04e-0114f49e6f75%40www.fastmail.com. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JYvL85UGYS9X3N%2B3XMhv1vLcAS0Tnc7OSBQQ7AZSxDbg%40mail.gmail.com.
