On Mon, Aug 12, 2019, at 7:47 PM, Aaron Meurer wrote:
> A possible middle ground would be to print the definition as a SymPy
> expression. The docstrings in the ODE module use the ODE module to
> pretty print the general solution
> https://docs.sympy.org/latest/modules/solvers/ode.html (unfortunately,
> using the ASCII pretty printer, we could potentially use Unicode if we
> fix https://github.com/sympy/sympy/issues/15700.
>
> It doesn't apply to every function. Some formulas aren't expressible
> in SymPy. I think a good middle ground would be to show the LaTeX, so
> that it looks nice in the HTML, but also pretty print the formula in a
> doctest so that it is readable in plain text (and also you get the
> SymPy code for the definition formula). The only downside is that the
> information becomes duplicated.
>
> Another idea, I don't know how hard it would be, or how confusing the
> output would be to people reading the page, would be to have a special
> pretty print function that shows the pprint() output in the docstring
> itself, but the Sphinx build would replace that with a LaTeX
> representation.
We can port all missing features from Fungrim into SymPy, so that we can use
SymPy itself to represent any math. There are a few things that can't be
represented by SymPy naturally:
* such as "x+x".
* order of terms "x*y" vs "y*x", the same with "x+y" vs "y+x"
That is a fundamental design choice, needed for performance (even more so in
SymEngine). Besides those, I don't know if there is some other obstacle to
represent all the things from Fulgrim. When looking at the formulas that we
need to represent, I don't think we ever need things like "x+x", but it would
be useful to preserve the order of terms.
I don't know if there are other semantic differences between SymPy and Fungrim.
Fredrik, do you know if there are other issues?
Ondrej
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/ae7bd8c1-b83a-4465-ad9a-54fdb5fc365d%40www.fastmail.com.