On Tue, May 22, 2018 at 7:08 AM, Nikhil Pappu <nkhlpa...@gmail.com> wrote:
> Ondrej,
>
> Thanks for the detailed explanation. I get the significance of an AST now.
> I will continue with what I am doing now as you mentioned. I will see if I
> can make the switch once you send that PR.
> If not possible now, then I will definitely work on switching to it later.
> I also plan on writing extensive test cases.
>
> Regarding my status:
> I will soon be done with the mathematical entities. I will start with the
> symbolic dynamics parts right after that.
>
> There were some issues I faced :
>
> 1. Some output results differ between Autolev and SymPy.
> For example:
>
> e = 4*x**2 + 7*x*y + 21*x + 4*y**2 + 21*y
> factor(e, x) in Autolev
> e.factor(x) in SymPy
>
> outputs:
>
> 21*y + 4*y^2 + 4*x*(5.25 + x +1.75*y)
> in Autolev
> and
>
> (7*y + 21)*x + 4*x**2 + 4*y**2 + 21*y
> in SymPy
>
> Do differences like these matter? Is there a way to get the same result in
> this case?
> Should we try to get the exact same outputs in cases like these?
> I am in the mindset that end numerical results are more important than
> equivalence of intermediate expressions.

It looks like Autolev uses a different definition of factor() than
SymPy. I wouldn't in general expect Autolev and SymPy functions to do
the same thing just because they have the same name. Autolev's
factor() looks more like SymPy's horner(), although I would need to
see more examples of what it does to be sure of that.

>
> 2. One major issue I was facing was with dynamicsymbols.
> The thing is I need to define all the Autolev variables as dynamicsymbols
> and constants as symbols.
> I need to do this because Autolev simply uses Variables and Constants for
> everything and I need the variables to be defined as
> dynamicsymbols for them to work with the physical entities.
> Although the dynamicsymbols would work like they should with the physics
> entities, that doesn't seem to be the case with the
> mathematical entities of SymPy as they do not seem to be written with
> dynamicsymbols in mind.
>
> In particular, I have found that dynamicsymbols do not work with dsolve,
> solveset.nonlinsolve and series expansions.
>
> See this issue:
> https://github.com/sympy/sympy/issues/12044
>
> I will have to use these when I tackle the solvers after I am done with
> parsing the basic physics entities.
> It would be great if someone could look into this.

dynamicsymbols are just SymPy Functions of t, so anything that doesn't
work with them should be fixed.

Aaron Meurer

>
> --
> 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 https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/2862ac25-6b9d-47a2-aec9-eae6c48d3463%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6Kixhrww-nebhf3UvD_Vmpx2bY1BMxkZj6J%2BH9xZS5r4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to