Open source computer algebra systems Riccardo Guida and Sylvain Ribault IPhT Saclay Tuesday 7 May 2019 Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 1 / 9
Summary the trouble with Mathematica; a quick overview of the best Open Source Computer Algebra Systems (OSCAS) available today; a demonstration of SymPy. Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 2 / 9
The trouble with Mathematica Mathematica is the most widespread computer algebra system in our field. However, it is expensive for non-academic researchers; it is not accessible by anyone anywhere (collaborators, readers of your articles, yourself after moving to another institute or ending your grant); availability of old versions is not guaranteed , and is subject to Wolfram’s commercial policy. IPhT-specific problems: We currently pay 25k e /year for only 10 system-wide licenses. We used to pay the same price for 200 licenses. Then a new salesperson came. We bought “perpetual” licenses for 11 users on MacOS. But these 32-bits licences will be unusable on the next version of MacOS (64-bits only). Upgrade cost: ∼ 700 e per “perpetual” license. Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 3 / 9
Open source software Open source software solves the problems of cost and license availability. Other advantages include: Verifiability of algorithms : no need to trust a black box. Influencing development of the software by reporting bugs, writing code yourself, or giving grant money for adding a feature you need. Anyone can check, reproduce, and improve your results, if you give them your code. Mathematica is generally more complete and advanced than the OS alternatives . . . . . . but most people, most of the time, do not need the advanced features. You would not lose much by switching to open source tools, unless you are captive of a large existing body of code and/or specialized packages. (And if you are captive, you can use OSCAS for double-checking.) Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 4 / 9
IPhT Survey Which computer algebra system(s) did you use in the last 3 years? Mathematica Maple Matlab SymPy/NumPy/SciPy SageMath Maxima FriCAS Cadabra Open? ✗ ✗ ✗ ✓ ✓ ✓ ✓ ✓ # Users 35 7 3 10 2 4 1 1 Thanks to the 42 participants! Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 5 / 9
OSCAS overview 1 SymPy SageMath Maxima FriCAS Initial release 2007 2005 1998 2007 Non-OS base – – Macsyma 1982 Axiom 1977 Contributors 1 59 63 11 3 User Language Python Python-ish Maxima SPAD Interpreter CPython, CPython Common Lisp Common Lisp PyPy Expected speed C / 50 C / 50 to C C / 5 C / 5 Notebooks Jupyter, Jupyter, wxMaxima, TeX- TeXmacs TeXmacs TeXmacs macs 1 Number of contributors with more than 9 commits between 2018-03-15 and 2019-03-15. Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 6 / 9
OSCAS overview 2 SymPy, SageMath, Maxima, Fricas: multi-platform, generalist OSCAS that have the usual basic features: limits, derivatives, Taylor series, basic integrals, linear algebra, special functions, polynomial equations, basic ODEs, replacements, arbitrary precision numerics, . . . They differ in the availability and quality of more advanced features. Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 7 / 9
OSCAS overview 3 SageMath � SageMath = SageMathCore ⊕ SymPy ⊕ Maxima ⊕ · · · ⊕ FriCAS � Manifolds, number theory, combinatorics � Interface to other OSCAS not always transparent Maxima � Easy language not so far from Mathematica � Poor development of new mathematical features FriCAS � Dedicated language inspired by mathematics � New advanced mathematical features at each release � Antiderivatives, noncommutative algebra, sparse polynomials � Features such as plotting are postponed to better times Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 8 / 9
SymPy overview SymPy � Python = very easy and widespread language; Google/StackOverflow answer all questions � SymPy is a Python module, can be combined with other modules such as NumPy, SciPy, etc � Proactive developer community (including Google-funded interns) � Generalized hypergeometrics, automatic generation and execution of code, rule-based integration tools (RUBI) Riccardo Guida and Sylvain Ribault (IPhT) OSCAS Tuesday 7 May 2019 9 / 9
Recommend
More recommend