Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Symbolic Maths in Python (2017) (alexandrugris.github.io)
90 points by vyuh on Nov 23, 2019 | hide | past | favorite | 8 comments


For those interested, with sympy's lambdify you can do some cool stuff. Here I create a lazy-evaluated version of pricing a third order greek: https://github.com/timkpaine/tributary/blob/master/examples/...


Maxima[1] is also a very cool symbolic math system. They should migrate to GitHub or GitLab though for a better visibility and lower barrier for external contributions.

[1] http://maxima.sourceforge.net/


When I temporarily gave up trying to apply myself towards my math coursework during high school, I used Maxima to breeze through an online Algebra 2 class. Not a great story, but I can attest that it works.


The SymPy online REPL is very good: https://live.sympy.org/ You can test out commands w/o installing. It also has a very useful feature to turn a session into a URL: https://live.sympy.org/?evaluate=factor(x**2%20-%20y**2)%0A%... (e.g to share the solution to a math problem)

For more info on SymPy, check out this short tutorial that I wrote: https://minireference.com/static/tutorials/sympy_tutorial.pd...

And for even more details, the official tutorial docs are here: https://docs.sympy.org/latest/tutorial/index.html


just use sagemath


What are sagemath's advantages over sympy? What are sympy's?


Sagemath includes a lot more math, esp. number theoretic stuff, and is a quite large. (~1.6G compressed) Sympy is _much_ smaller and integrates more easily into python code that isn't solely mathematical.


Sagemath includes sympy?




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: