SageMath: Difference between revisions
Extended confirmed users 2,272 edits Preview release 8.7.beta3 (8 February 2019): http://mirrors.mit.edu/sage/devel/index.html |
Updated alexa rating |
||
Line 27: | Line 27: | ||
| genre = [[Computer algebra system]] |
| genre = [[Computer algebra system]] |
||
| license = [[GPLv3]]<ref name="GPL">{{cite web|url=https://git.sagemath.org/sage.git/tree/COPYING.txt|title=COPYING.txt – sage.git|publisher=The Sage Repository|accessdate=4 April 2017}}</ref> |
| license = [[GPLv3]]<ref name="GPL">{{cite web|url=https://git.sagemath.org/sage.git/tree/COPYING.txt|title=COPYING.txt – sage.git|publisher=The Sage Repository|accessdate=4 April 2017}}</ref> |
||
| alexa = {{Increase}}84, |
| alexa = {{Increase}}84,833 ({{as of|2019|2|13|alt=February 2019}})<ref name="alexa">{{cite web|url= https://www.alexa.com/siteinfo/sagemath.org|title= Sagemath.org Site Info | publisher= [[Alexa Internet]] |accessdate= 2018-02-13}}</ref> |
||
| website = {{URL|http://www.sagemath.org/}} |
| website = {{URL|http://www.sagemath.org/}} |
||
}} |
}} |
Revision as of 16:28, 13 February 2019
Initial release | 24 February 2005 |
---|---|
Stable release | 8.6
/ 15 January 2019 |
Preview release | 8.7.beta3
/ 8 February 2019 |
Repository | |
Written in | |
Platform | |
GPLv3[1] | |
Website | www |
SageMath (previously Sage or SAGE, "System for Algebra and Geometry Experimentation"[3]) is a computer algebra system with features covering many aspects of mathematics, including algebra, combinatorics, graph theory, numerical analysis, number theory, calculus and statistics.
The first version of SageMath was released on 24 February 2005 as
SageMath uses a syntax resembling Python's,[5] supporting procedural, functional and object-oriented constructs.
Features
Features of SageMath include:[6]
- A browser-based notebook for review and re-use of previous inputs and outputs, including graphics and text annotations. Compatible with Firefox, Opera, Konqueror, Google Chrome and Safari. Notebooks can be accessed locally or remotely and the connection can be secured with HTTPS.
- A text-based command-line interface using IPython.
- Support for parallel processing using multi-core processors, multiple processors, or distributed computing.
- Calculus using Maxima and SymPy.
- Numerical linear algebra using the GSL, SciPy and NumPy.
- Libraries of elementary and special mathematical functions.
- 2D and 3D graphs of symbolic functions and numerical data.
- Matrix manipulation, including sparse arrays.
- Multivariate statistics libraries, using R and SciPy.
- A toolkit for adding user interfaces to calculations and applications[7].
- Graph theory visualization and analysis tools.
- Libraries of number theory functions.
- Support for symbolic computation.
- Technical word processing including formula editing and embedding SageMath within LaTeX documents[8].
- The Python standard library, including tools for connecting to FTPand others.
- Interfaces to some third-party applications like .
- MoinMoin as a Wiki system for knowledge management.
- Documentation using Sphinx.
- An automated test-suite.
- Execution of Fortran, C, C++, and Cython code[9].
- SageMath can pull up Mathematica within a program.[10] Interfacing this way is documented officially to Sage.[11]
Development
William Stein realized when designing Sage that there were many open-source mathematics software packages already written in different languages, namely C, C++, Common Lisp, Fortran and Python.
Rather than reinventing the wheel, Sage (which is written mostly in Python and Cython) integrates many specialized mathematics software packages into a common interface, for which a user needs to know only Python. However, Sage contains hundreds of thousands of unique lines of code adding new functions and creating the interface between its components.[12]
SageMath uses both students and professionals for development. The development of SageMath is supported by both volunteer work and grants.[13] However, it was not until 2016 that the first full-time Sage developer was hired (funded by an EU grant).[14] The same year, Stein described his disappointment with a lack of academic funding and credentials for software development, citing it as the reason for his decision to leave his tenured academic position to work full-time on the project in a newly founded company, SageMath, Inc.[14]
Release history
Only the major releases are listed below. SageMath practices the "release early, release often" concept, with releases every few weeks or months. In total, there have been over 300 releases, although their frequency has decreased.[15]
Version | Release Date | Description |
---|---|---|
0.1 | January 2005 | Included PARI, but not GAP or Singular |
0.2–0.4 | March to July 2005 | Cremona's database, multivariate polynomials, large finite fields and more documentation |
0.5–0.7 | August to September 2005 | Vector spaces, rings, modular symbols, and windows usage |
0.8 | October 2005 | Full distribution of GAP, Singular |
0.9 | November 2005 | Maxima and clisp added |
1.0 | February 2006 | |
2.0 | January 2007 | |
3.0 | April 2008 | Interacts, R interface |
4.0 | May 2009 | Solaris 10 support, 64-bit OS X support |
5.0 | May 2012[16] | OS X Lion support |
6.0 | December 2013 | SageMath Development moved to Git[17] |
7.0 | January 2016 | Massive GUI improvement |
8.0 | July 2017 | First version with fully working Windows support |
Achievements
- 2007: first prize in the scientific software division of Les Trophées du Libre, an international competition for free software.[18]
- 2012: one of the projects selected for the Google Summer of Code.[19]
- 2013: ACM/SIGSAM Jenks Prize.[20]
- SageMath has been cited in a variety of publications.[21][22]
Performance
Both binaries and source code are available for SageMath from the download page. If SageMath is built from source code, many of the included libraries such as ATLAS, FLINT, and NTL will be tuned and optimized for that computer, taking into account the number of processors, the size of their caches, whether there is hardware support for SSE instructions, etc.
Cython can increase the speed of SageMath programs, as the Python code is converted into C.[23]
Licensing and availability
SageMath is
- The source code can be downloaded from the downloads page. Although not recommended for end users, development releases of SageMath are also available. Many Linux distributions also include SageMath in their repositories [see below].
- Binaries can be downloaded for Linux, macOS and Solaris (both x86 and SPARC).
- A live CD containing a bootable Linux operating system is also available. This allows usage of SageMath without Linux installation.
- Users could have used an online version of SageMath at sagenb.org, but it has been discontinued in April 2015.
- Users can use an online "single cell" version of SageMath at sagecell.sagemath.org or embed a single SageMath cell into any web page. Users can also create permalinks to SageMath computations using the cell server.[24]
- A new online SageMath notebook is available at cocalc.com.
Full documentation for installation is provided at doc.sagemath.org/html/en/installation/.
Although Microsoft was sponsoring a native version of SageMath for the Windows operating system, prior to 2016 there were no plans for a native port, and users of Windows had to use virtualization technology such as VirtualBox to run SageMath.[25] As of SageMath 8.0 (July 2017), with development funded by the OpenDreamKit project[14], it successfully builds on Cygwin, and a binary installer for 64-bit versions of Windows is available.[26]
Linux distributions in which SageMath is available as a package are
Software packages contained in SageMath
The philosophy of SageMath is to use existing open-source libraries wherever they exist. Therefore, it uses many libraries from other projects.
Mathematics packages contained in SageMath[28] |
Algebra | FLINT
|
---|---|---|
Algebraic geometry | Singular | |
Arbitrary precision arithmetic | ||
Arithmetic geometry | ECM
| |
Calculus | Giac, FriCAS
| |
Combinatorics | Symmetrica, Sage-Combinat | |
Linear algebra | ||
Graph theory | NetworkX | |
Group theory | GAP | |
Numerical computation | GSL, SciPy, NumPy, ATLAS | |
Number theory | FLINT, NTL
| |
Statistical computing | R, SciPy | |
Other packages contained in SageMath |
Command-line shell | IPython |
Database | ZODB, SQLite
| |
Graphical interface | SageMath Notebook, jsMath | |
Graphics | matplotlib, Tachyon, GD, Jmol | |
Interactive programming language | Python | |
Networking | Twisted | |
Other Mathematics package available for SageMath |
Differential Geometry and Tensor Calculus |
Sage Manifolds |
Usage examples
Algebra and calculus
x, a, b, c = var('x, a, b, c')
# Note that IPython also supports a faster way to do this, by calling
# this equivalent expression starting with a comma:
# ,var x a b c
log(sqrt(a)).simplify_log() # returns 1/2*log(a)
log(a / b).expand_log() # returns log(a) - log(b)
sin(a + b).simplify_trig() # returns sin(a)*cos(b) + sin(b)*cos(a)
cos(a + b).simplify_trig() # returns -sin(a)*sin(b) + cos(a)*cos(b)
(a + b)^5 # returns (a + b)^5
expand((a + b) ^ 5) # a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5
limit((x ^ 2 + 1) / (2 + x + 3 * x ^ 2), x=Infinity) # returns 1/3
limit(sin(x) / x, x=0) # returns 1
diff(acos(x), x) # returns -1/sqrt(-x^2 + 1)
f = exp(x) * log(x)
f.diff(x, 3) # returns e^x*log(x) + 3*e^x/x - 3*e^x/x^2 + 2*e^x/x^3
solve(a * x ^ 2 + b * x + c, x) # returns [x == -1/2*(b + sqrt(-4*a*c + b^2))/a,
# x == -1/2*(b - sqrt(-4*a*c + b^2))/a]
f = x ^ 2 + 432 / x
solve(f.diff(x) == 0, x) # returns [x == 3*I*sqrt(3) - 3,
# x == -3*I*sqrt(3) - 3, x == 6]
Differential equations
t = var('t') # define a variable t
x = function('x')(t) # define x to be a function of that variable
de = (diff(x, t) + x == 1)
desolve(de, [x, t]) # returns (c + e^t)*e^(-t)
Linear algebra
A = matrix([[1, 2, 3], [3, 2, 1], [1, 1, 1]])
y = vector([0, -4, -1])
A.solve_right(y) # returns (-2, 1, 0)
A.eigenvalues() # returns [5, 0, -1]
B = matrix([[1, 2, 3], [3, 2, 1], [1, 2, 1]])
B.inverse() # returns
[ 0 1/2 -1/2]
[-1/4 -1/4 1]
[ 1/2 0 -1/2]
# same matrix, but over the ring of doubles (not rationals, as above)
sage: B = matrix(RDF, [[1, 2, 3], [3, 2, 1], [1, 2, 1]])
sage: B.inverse()
[-5.55111512313e-17 0.5 -0.5]
[ -0.25 -0.25 1.0]
[ 0.5 0.0 -0.5]
# The Moore-Penrose pseudo-inverse
sage: C = matrix([[1 , 1], [2 , 2]])
sage: C.pseudoinverse()
[1/10 1/5]
[1/10 1/5]
# Alternatively, call NumPy for the pseudo-inverse
# (only numerical)
import numpy
C = matrix([[1 , 1], [2 , 2]])
matrix(numpy.linalg.pinv(C)) # returns
[0.1 0.2]
[0.1 0.2]
Number theory
prime_pi(1000000) # returns 78498, the number of primes less than one million
E = EllipticCurve('389a') # construct an elliptic curve from its Cremona label
P, Q = E.gens()
7 * P + Q # returns (24187731458439253/244328192262001 :
# 3778434777075334029261244/3819094217575529893001 : 1)
sage: E2 = EllipticCurve(CC, [0,0,-2,1,1])
sage: E2
Elliptic Curve defined by y^2 + (-2.00000000000000)*y =
x^3 + 1.00000000000000*x + 1.00000000000000 over
Complex Field with 53 bits of precision
sage: E2.j_invariant()
61.7142857142857
Commutative algebra
sage: P.<x, y, z> = PolynomialRing(QQ) # polynomial ring in x, y, z over the rationals
sage: (x**3 + y**3 + z**3 - 3*x*y*z).factor()
(x + y + z) * (x^2 - x*y + y^2 - x*z - y*z + z^2)
sage: I = P.ideal(x**2, x*y - y**2) # ideals defined by generators
sage: I.groebner_basis()
[y^3, x^2, x*y - y^2]
See also
- CoCalc
- List of computer algebra systems
- Comparison of numerical analysis software
- Comparison of statistical packages
References
- ^ a b "COPYING.txt – sage.git". The Sage Repository. Retrieved 4 April 2017.
- ^ "Sagemath.org Site Info". Alexa Internet. Retrieved 2018-02-13.
- ^ Stein, William. "SAGE: A Computer System for Algebra and Geometry Experimentation". Retrieved 30 March 2012.
- ^ Stein, William (12 June 2007). "Sage Days 4" (PDF). Archived from the original (PDF) on 27 June 2007. Retrieved 2 August 2007.
- ISBN 9783319167381.
- ^ "Sage Documentation". SageMath Help. Retrieved 6 January 2017.
- ^ "Sage Interactions". SageWiki. 9 October 2016. Retrieved 6 January 2017.
- ^ "Using SageTeX". Sage Online Documentation. Retrieved 6 January 2016.
- ^ "Using Compiled Code Interactively". Sage Online Documentation. Retrieved 6 January 2017.
- ^ "Using Mathematica within Sagemath | LSUMath". www.math.lsu.edu. Retrieved 8 January 2017.
- ^ "Interface to Mathematica — Sage Reference Manual v7.4: Interpreter Interfaces". doc.sagemath.org. Retrieved 8 January 2017.
- ^ "Sage Days 7: Combinatorics". SageWiki. 14 November 2008. Retrieved 9 December 2013.
- ^ "Sage – Acknowledgement to Supporters". Retrieved 6 January 2017.
- ^ a b c William Stein: The origins of SageMath – creating a viable open source alternative to Magma, Maple, Mathematica, and Matlab (presentation, 11 June 2016)
- ^ "Source Code for Old Versions". 18 December 2015. Retrieved 6 January 2017.
- ^ "sage-5.0.txt". Retrieved 6 January 2017.
- ^ "Installing and using SageMath just got even easier". 18 December 2013. Retrieved 6 January 2017.
- ^ "Free Software Brings Affordability, Transparency To Mathematics". Science Daily. 7 December 2007. Retrieved 6 January 2017.
- ^ "Sage Mathematical Software System". Google Summer of Code / Code-in Archive. Retrieved 6 January 2017.
- ^ "Richard Dimick Jenks Memorial Prize 2013 Award". Association for Computing Machinery – SIGSAM. Retrieved 6 January 2017.
- ^ "Publications Citing Sage". Retrieved 6 January 2017.
- ^ "Publications Citing Sage-Combinat". Retrieved 6 January 2017.
- ^ Stein, William (3 November 2010). "Cython, Sage, and the Need for Speed". Retrieved 6 January 2017.
- ^ "About SageMathCell". sagecell.sagemath.org. Retrieved 6 January 2017.
- ^ Stein, William (16 March 2012). "Re: Question about Sage". Retrieved 6 January 2017.
- ^ Lelievre, Samuel (18 August 2017). "SageMath 8.0 installer for Windows". Retrieved 28 August 2017.
- ^ "sage-on-gentoo Wiki". Retrieved 6 January 2017.
- ^ "Standard Packages". doc.sagemath.org. Retrieved 6 January 2017.
External links
- Official website
- Official SageMath documentation, reference, and tutorials
- SageMath introduction videos
- AMS Notices Opinion – Open Source Mathematical Software
- W. Stein's blog post on history of Sage
- Sage on GitHub (main)
- Sage Math on Google Play
- Sage Android package at the F-Droid repository
Related projects
- GNU Octave A numerical computation software platform which is also a GNU-licensed alternative to MATLAB.
- CoCalc Hosted version of SageMath online
- LMFDB database of L-functions, modular forms, and related objects
- FindStat database of combinatorial statistics