Sage (mathematics software)
| This article may rely too heavily on sources with too close a tie to the subject to be verifiable and neutral. Please help improve it by replacing them with more appropriate citations to reliable, independent, third-party sources. (January 2011) |
| Initial release | 24 February 2005 |
|---|---|
| Stable release | 4.8 (January 20, 2012)[1] [±] |
| Written in | Python, Cython |
| Operating system | Cross-platform |
| Platform | Python |
| Size | 411 MB download (Ubuntu 64-bit)[2] |
| Type | Computer algebra system |
| License | GNU General Public License |
| Website | www.sagemath.org |
Sage (previously SAGE) is mathematical software with features covering many aspects of mathematics, including algebra, combinatorics, numerical mathematics, number theory, and calculus. Sage is sometimes called sagemath to distinguish it from other uses of the word.
The first version of Sage was released on 24 February 2005 as free and open source software under the terms of the GNU General Public License, with the initial goals of creating an "open source alternative to Magma, Maple, Mathematica, and MATLAB."[3] The starter and leader of the Sage project, William Stein, is a mathematician at the University of Washington.
Sage uses the Python programming language, supporting procedural, functional and object-oriented constructs.
Contents |
[edit] Features
Features of Sage include:[4]
- A notebook document interface for review and re-use of previous inputs and outputs, including graphics and text annotations. Usable from most web browsers, including Firefox, Opera, Konqueror, and Safari. A secure connection via HTTPS to the notebook is supported when security or confidentiality are important. The notebook interface can be used both locally and remotely.
- A text-based command-line interface using IPython
- Support for parallel processing using multi-core processors found in many modern computers, 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 both functions and data
- Matrix and data manipulation tools, including support for sparse arrays
- Multivariate statistics libraries, using the functionality of R and SciPy
- A toolkit for adding user interfaces to calculations and applications[5]
- Graph theory visualization and analysis tools
- Libraries of number theory functions
- Import and export filters for data, images, video, sound, CAD, GIS, document and biomedical formats
- Support for complex number, arbitrary precision and symbolic computation for functions where this is appropriate
- Technical word processing including formula editing and the ability to embed Sage inside LaTeX documents[6]
- The Python standard library, including tools for connecting to SQL, HTTP, NNTP, IMAP, SSH, IRC, FTP and others
- Interfaces to some third-party software like Mathematica, Magma, R, and Maple
- MoinMoin as a Wiki system for knowledge management
- Documentation using Sphinx
- An automated test-suite, which allows for testing on an end-user's computer
- Execution of Fortran, C, C++, and Cython code[7]
Although not provided by Sage directly, Sage can be called from within Mathematica.[8] A Mathematica notebook is available for this purpose.[9]
[edit] Development
William Stein realized when designing Sage that there were many open-source mathematics software 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 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.[10]
Sage development uses both students and professionals for development. The development of Sage is supported by both volunteer work and grants.[11]
[edit] Release history
Only the major releases are listed below. Sage 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.[12]
| 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 | |
| 4.0 | May, 2009 | |
| 5.0 | future | 5.0 milestone |
[edit] Achievements
In 2007, Sage won first prize in the scientific software division of Les Trophées du Libre, an international competition for free software.[13]
Sage has been cited in a variety of publications.[14][15]
[edit] Performance
Both binaries and source code are available for Sage from the download page. If Sage 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.
Sage's speed is competitive with other mathematical software.[16][17]
Cython can increase the speed of Sage programs, as the Python code is converted into C.[18]
[edit] Licensing and availability
Sage is free software, distributed under the terms of the GNU General Public License version 2+. Sage is available in many ways:
- The source code can be downloaded from the downloads page. Although not recommended for end users, development releases of Sage are also available.
- Binaries can be downloaded for Linux, OS X and Solaris (both x86 and SPARC).
- A live CD containing a bootable Linux operating system is also available. This allows usage of Sage without Linux installation.
- Users can use an online version of Sage at sagenb.org or http://t2nb.math.washington.edu:8080/, but with a limit to the amount of memory a user can use.
Although Microsoft is sponsoring a native version of Sage for the Windows operating system,[19] users of Windows currently have to use virtualization technology such as VirtualBox to run Sage under one of the aforementioned operating systems. A Cygwin port is also being worked on.[20]
Linux distributions in which Sage is available as a package are Mandriva and Arch Linux. In Gentoo, it's available via layman in the "sage-on-gentoo"[21] overlay. However, Sage can be installed to any Linux distribution.
Gentoo prefix also provides Sage on other operating systems.
[edit] Software packages contained in Sage
The philosophy of Sage is to use existing open-source libraries wherever they exist. Therefore it uses many libraries from other projects.
| Algebra | GAP, Maxima, Singular, Macaulay 2 |
| Algebraic geometry | Singular, Macaulay 2 |
| Arbitrary precision arithmetic | MPIR, MPFR, MPFI, NTL, mpmath |
| Arithmetic geometry | PARI/GP, NTL, mwrank, ecm |
| Calculus | Maxima, SymPy, GiNaC |
| Combinatorics | Symmetrica, Sage-Combinat |
| Linear algebra | ATLAS, BLAS, LAPACK, NumPy, LinBox, IML, GSL |
| Graph theory | NetworkX |
| Group theory | GAP |
| Numerical computation | GSL, SciPy, NumPy, ATLAS, Scilab, Octave |
| Number theory | PARI/GP, FLINT, NTL, Kash/Kant |
| Statistical computing | R, SciPy |
| Command-line shell | IPython |
| Database | ZODB, Python pickles, SQLite |
| Mathematical type setting | LaTeX |
| Graphical interface | Sage Notebook, jsmath |
| Graphics | Matplotlib, Tachyon3d, GD, Jmol |
| Interactive programming language | Python |
| Networking | Twisted |
[edit] Usage examples
[edit] Algebra and calculus
x, a, b, c = 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]
[edit] Differential equations
t = var('t') # define a variable t x = function('x', t) # define x to be a function of that variable DE = lambda y: diff(y, t) + y - 1 desolve(DE(x(x=t)), [x, t]) # returns (c + e^t)*e^(-t)
[edit] 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]''' # Call NumPy for the Moore-Penrose pseudo-inverse, since Sage does not support that yet. import numpy C = Matrix([[1 , 1], [2 , 2]]) matrix(numpy.linalg.pinv(C.numpy())) # returns '''[0.1 0.2] [0.1 0.2]'''
[edit] 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)
[edit] See also
- Comparison of computer algebra systems
- Comparison of statistical packages
- Comparison of numerical analysis software
[edit] References
- ^ "http://www.sagemath.org/mirror/src/changelogs/sage-4.8.txt". http://www.sagemath.org/mirror/src/changelogs/sage-4.8.txt.
- ^ http://boxen.math.washington.edu/sage/linux/64bit/index.html Sage Download
- ^ Stein, William (2007-06-12). "SAGE Days 4". Archived from the original on 2007-06-27. http://web.archive.org/web/20070627235122/http://www.sagemath.org/why/stein-sd4.pdf. Retrieved 2007-08-02.
- ^ Sage documentation
- ^ "Sage Interact functionality". http://wiki.sagemath.org/interact. Retrieved 2008-04-11.
- ^ Using SageTeX
- ^ "Using Compiled Code Interactively". Sage Documentation. http://www.sagemath.org/doc/numerical_sage/using_compiled_code_iteractively.html. Retrieved 14 July 2011.
- ^ http://facstaff.unca.edu/mcmcclur/Mathematica/Sage/ Calling Sage from Mathematica
- ^ http://facstaff.unca.edu/mcmcclur/Mathematica/Sage/UsingSage.nb A Mathematica notebook to call Sage from Mathematica.
- ^ http://wiki.sagemath.org/days7
- ^ "Sage – Acknowledgement". http://www.sagemath.org/development-ack.html. Retrieved 2010-07-13.
- ^ "Sage Download - src-old". http://sagemath.org/src-old/. Retrieved 17 July 2011.
- ^ "Free Software Brings Affordability, Transparency To Mathematics". Science Daily. December 7, 2007. http://www.sciencedaily.com/releases/2007/12/071206145213.htm. Retrieved 2008-07-20.
- ^ "Publications Citing Sage". http://www.sagemath.org/library-publications.html. Retrieved 14 July 2011.
- ^ "Publications Citing Sage-Combinat". http://www.sagemath.org/library-publications-combinat.html. Retrieved 14 July 2011.
- ^ http://www.sagemath.org/tour-benchmarks.html Sage-Tour-Benchmarks
- ^ http://wiki.sagemath.org/sagebeatsmagma List of Computations where Sage is Noticeably Faster than Magma
- ^ http://sagemath.blogspot.com/2010/11/cython-sage-and-need-for-speed.html Cython, Sage, and the Need for Speed
- ^ Sage – Acknowledgment
- ^ "Cygwin Port". http://trac.sagemath.org/sage_trac/wiki/CygwinPort.
- ^ sage-on-gentoo
[edit] External links
| Wikibooks has a book on the topic of |
| Wikimedia Commons has media related to: Sage (mathematics software) |
- Project home page
- Official Sage documentation, reference, and tutorials
- Sage introduction videos
- Use Sage online in your web browser
- Free software brings affordability, transparency to mathematics
- AMS Notices Opinion – Open Source Mathematical Software
- W. Stein's blog post on history of Sage
|
|||||||||||||||||
|
|||||||||||