SAGE (Computer Algebra System)
Encyclopedia
Sage is mathematical software
Mathematical software
Mathematical software is software used to model, analyze or calculate numeric, symbolic or geometric data.-Computer algebra systems:Many mathematical suites are computer algebra systems that use symbolic mathematics. They are designed to solve classical algebra equations and problems in human...

 with features covering many aspects of mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, including algebra
Algebra
Algebra is the branch of mathematics concerning the study of the rules of operations and relations, and the constructions and concepts arising from them, including terms, polynomials, equations and algebraic structures...

, combinatorics
Combinatorics
Combinatorics is a branch of mathematics concerning the study of finite or countable discrete structures. Aspects of combinatorics include counting the structures of a given kind and size , deciding when certain criteria can be met, and constructing and analyzing objects meeting the criteria ,...

, numerical mathematics, number theory
Number theory
Number theory is a branch of pure mathematics devoted primarily to the study of the integers. Number theorists study prime numbers as well...

, and calculus
Calculus
Calculus is a branch of mathematics focused on limits, functions, derivatives, integrals, and infinite series. This subject constitutes a major part of modern mathematics education. It has two major branches, differential calculus and integral calculus, which are related by the fundamental theorem...

. 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
Free and open source software
Free and open-source software or free/libre/open-source software is software that is liberally licensed to grant users the right to use, study, change, and improve its design through the availability of its source code...

 under the terms of the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

, with the initial goals of creating an "open source alternative to Magma
Magma computer algebra system
Magma is a computer algebra system designed to solve problems in algebra, number theory, geometry and combinatorics. It is named after the algebraic structure magma...

, Maple
Maple (software)
Maple is a general-purpose commercial computer algebra system. It was first developed in 1980 by the Symbolic Computation Group at the University of Waterloo in Waterloo, Ontario, Canada....

, Mathematica
Mathematica
Mathematica is a computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing...

, and MATLAB
MATLAB
MATLAB is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages,...

." The starter and leader of the Sage project, William Stein
William A. Stein
William Arthur Stein is a professor of mathematics at the University of Washington.He is best known as the lead developer of Sage. He is known as a major proponent of open-source scientific software...

, is a mathematician
Mathematician
A mathematician is a person whose primary area of study is the field of mathematics. Mathematicians are concerned with quantity, structure, space, and change....

 at the University of Washington
University of Washington
University of Washington is a public research university, founded in 1861 in Seattle, Washington, United States. The UW is the largest university in the Northwest and the oldest public university on the West Coast. The university has three campuses, with its largest campus in the University...

.

Sage uses the Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 programming language, supporting procedural
Procedural programming
Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm, derived from structured programming, based upon the concept of the procedure call...

, functional
Functional programming
In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state...

 and object-oriented
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 constructs.

Features

Features of Sage include:
  • 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
    Opera (web browser)
    Opera is a web browser and Internet suite developed by Opera Software with over 200 million users worldwide. The browser handles common Internet-related tasks such as displaying web sites, sending and receiving e-mail messages, managing contacts, chatting on IRC, downloading files via BitTorrent,...

    , Konqueror
    Konqueror
    Not to be confused with the Conqueror web browser.Konqueror is a web browser and file manager that provides file-viewer functionality for file systems such as local files, files on a remote ftp server and files in a disk image. It is a core part of the KDE desktop environment...

    , and Safari
    Safari (web browser)
    Safari is a web browser developed by Apple Inc. and included with the Mac OS X and iOS operating systems. First released as a public beta on January 7, 2003 on the company's Mac OS X operating system, it became Apple's default browser beginning with Mac OS X v10.3 "Panther". Safari is also the...

    . A secure connection via HTTPS
    Https
    Hypertext Transfer Protocol Secure is a combination of the Hypertext Transfer Protocol with SSL/TLS protocol to provide encrypted communication and secure identification of a network web server...

     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
    Command-line interface
    A command-line interface is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks...

     using IPython
    IPython
    IPython is an interactive shell for the Python programming language that offers enhanced introspection, additional shell syntax, tab completion and rich history.- Other features :...

  • Support for parallel processing
    Parallel computing
    Parallel computing is a form of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved concurrently . There are several different forms of parallel computing: bit-level,...

     using multi-core processors
    Multi-core (computing)
    A multi-core processor is a single computing component with two or more independent actual processors , which are the units that read and execute program instructions...

     found in many modern computers, multiple processors
    Symmetric multiprocessing
    In computing, symmetric multiprocessing involves a multiprocessor computer hardware architecture where two or more identical processors are connected to a single shared main memory and are controlled by a single OS instance. Most common multiprocessor systems today use an SMP architecture...

    , or distributed computing
    Distributed computing
    Distributed computing is a field of computer science that studies distributed systems. A distributed system consists of multiple autonomous computers that communicate through a computer network. The computers interact with each other in order to achieve a common goal...

  • Calculus using Maxima and SymPy
    SymPy
    SymPy is a Python library for symbolic computation. The stated goals of the library are to become a full-featured computer algebra system and to keep a simple code base to promote extensibility and comprehensibility. SymPy is written in Python....

  • Numerical linear algebra using the GSL
    GNU Scientific Library
    In computing, the GNU Scientific Library is a software library written in the C programming language for numerical calculations in applied mathematics and science...

    , SciPy
    SciPy
    SciPy is an open source library of algorithms and mathematical tools for the Python programming language.SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and...

     and NumPy
  • Libraries of elementary and special
    Special functions
    Special functions are particular mathematical functions which have more or less established names and notations due to their importance in mathematical analysis, functional analysis, physics, or other applications....

     mathematical functions
  • 2D and 3D graphs of both functions and data
  • Matrix and data manipulation tools, including support for sparse array
    Sparse array
    In computer science, a sparse array is an array in which most of the elements have the same value . The occurrence of zero elements in a large array is inconvenient for both computation and storage...

    s
  • Multivariate statistics
    Statistics
    Statistics is the study of the collection, organization, analysis, and interpretation of data. It deals with all aspects of this, including the planning of data collection in terms of the design of surveys and experiments....

     libraries, using the functionality of R
    R (programming language)
    R is a programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians for developing statistical software, and R is widely used for statistical software development and data analysis....

     and SciPy
    SciPy
    SciPy is an open source library of algorithms and mathematical tools for the Python programming language.SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and...

  • A toolkit for adding user interface
    User interface
    The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

    s to calculations and applications
  • Graph theory
    Graph theory
    In mathematics and computer science, graph theory is the study of graphs, mathematical structures used to model pairwise relations between objects from a certain collection. A "graph" in this context refers to a collection of vertices or 'nodes' and a collection of edges that connect pairs of...

     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
    Complex number
    A complex number is a number consisting of a real part and an imaginary part. Complex numbers extend the idea of the one-dimensional number line to the two-dimensional complex plane by using the number line for the real part and adding a vertical axis to plot the imaginary part...

    , arbitrary precision and symbolic computation
    Symbolic computation
    Symbolic computation or algebraic computation, relates to the use of machines, such as computers, to manipulate mathematical equations and expressions in symbolic form, as opposed to manipulating the approximations of specific numerical quantities represented by those symbols...

     for functions where this is appropriate
  • Technical word processing including formula editing
    Formula editor
    A formula editor is a name for a computer program that is used to typeset mathematical works or formulae.Formula editors typically serve two purposes:...

     and the ability to embed Sage inside LaTeX
    LaTeX
    LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

     documents
  • The Python standard library, including tools for connecting to SQL
    SQL
    SQL is a programming language designed for managing data in relational database management systems ....

    , HTTP, NNTP, IMAP, SSH
    Secure Shell
    Secure Shell is a network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers that it connects via a secure channel over an insecure network: a server and a client...

    , IRC, FTP and others
  • Interfaces to some third-party software like Mathematica
    Mathematica
    Mathematica is a computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing...

    , Magma
    Magma computer algebra system
    Magma is a computer algebra system designed to solve problems in algebra, number theory, geometry and combinatorics. It is named after the algebraic structure magma...

    , R
    R (programming language)
    R is a programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians for developing statistical software, and R is widely used for statistical software development and data analysis....

    , and Maple
    Maple (software)
    Maple is a general-purpose commercial computer algebra system. It was first developed in 1980 by the Symbolic Computation Group at the University of Waterloo in Waterloo, Ontario, Canada....

  • MoinMoin
    MoinMoin
    MoinMoin is a wiki engine implemented in Python, initially based on the PikiPiki wiki engine. The MoinMoin code is licensed under the GNU General Public License v2, or any later version .A number of organizations use MoinMoin to run public wikis,...

     as a Wiki
    Wiki
    A wiki is a website that allows the creation and editing of any number of interlinked web pages via a web browser using a simplified markup language or a WYSIWYG text editor. Wikis are typically powered by wiki software and are often used collaboratively by multiple users. Examples include...

     system for knowledge management
  • Documentation using Sphinx
    Sphinx (documentation generator)
    Sphinx is a documentation generator which converts reStructuredText files into HTML websites and other formats including PDF, EPub and man. It exploits the extensible nature of reStructuredText through a number of extensions...

  • An automated test-suite, which allows for testing on an end-user's computer
  • Execution of Fortran
    Fortran
    Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...

    , C
    C (programming language)
    C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

    , C++
    C++
    C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

    , and Cython
    Cython
    Cython is a programming language to simplify writing C and C++ extension modules for the CPython Python runtime. Strictly speaking, Cython syntax is a superset of Python syntax additionally supporting:...

     code


Although not provided by Sage directly, Sage can be called from within Mathematica
Mathematica
Mathematica is a computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing...

. A Mathematica notebook is available for this purpose.

Development

William Stein
William A. Stein
William Arthur Stein is a professor of mathematics at the University of Washington.He is best known as the lead developer of Sage. He is known as a major proponent of open-source scientific software...

 realized when designing Sage that there were many open-source mathematics software already written in different languages, namely C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

, C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

, Fortran
Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...

 and Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

.

Rather than reinventing the wheel
Reinventing the wheel
To reinvent the wheel is to duplicate a basic method that has already previously been created or optimized by others.The inspiration for this idiomatic metaphor lies in the fact that the wheel is the archetype of human ingenuity, both by virtue of the added power and flexibility it affords its...

, Sage (which is written mostly in Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 and Cython
Cython
Cython is a programming language to simplify writing C and C++ extension modules for the CPython Python runtime. Strictly speaking, Cython syntax is a superset of Python syntax additionally supporting:...

) integrates many specialized mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

 software into a common interface, for which a user needs to know only Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

. However, Sage contains hundreds of thousands of unique lines of code adding new functions and creating the interface between its components.

Sage development uses both students and professionals for development. The development of Sage is supported by both volunteer work and grants.

Release history

Only the major releases are listed below. Sage practices the "release early, release often
Release early, release often
Release early, release often is a software development philosophy that emphasizes the importance of early and frequent releases in creating a tight feedback loop between developers and testers or users...

" concept, with releases every few weeks or months. In total, there have been over 300 releases, although their frequency has decreased.
Sage versions
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

Achievements

In 2007, Sage won first prize in the scientific software division of Les Trophées du Libre
Les Trophées du Libre
Les Trophées du Libre contest is a free software contest whose goal is to promote innovative software projects and give these projects recognition and media coverage - recently also to motivate students and academic institutions with special prizes. The competition is international and it is...

, an international competition for free software.

Sage has been cited
Citation
Broadly, a citation is a reference to a published or unpublished source . More precisely, a citation is an abbreviated alphanumeric expression Broadly, a citation is a reference to a published or unpublished source (not always the original source). More precisely, a citation is an abbreviated...

 in a variety of publications.

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
Automatically Tuned Linear Algebra Software
Automatically Tuned Linear Algebra Software is a software library for linear algebra. It provides a mature open source implementation of BLAS APIs for C and Fortran77....

, FLINT
Fast Library for Number Theory
The Fast Library for Number Theory is a highly optimized C library for number theory applications. The two major areas of functionality currently implemented in FLINT are polynomial arithmetic over the integers and a quadratic sieve. The library is designed to be compiled with the GNU...

, and NTL
Number Theory Library
NTL is a C++ library for doing number theory. NTL supports arbitrary length integer and arbitrary precision floating point arithmetic, finite fields, vectors, matrices, polynomials, lattice basis reduction and basic linear algebra. NTL is free software released under the GNU General Public License....

 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
Streaming SIMD Extensions
In computing, Streaming SIMD Extensions is a SIMD instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in their Pentium III series processors as a reply to AMD's 3DNow! . SSE contains 70 new instructions, most of which work on single precision floating point...

 instructions, etc.

Sage's speed is competitive with other mathematical software.

Cython
Cython
Cython is a programming language to simplify writing C and C++ extension modules for the CPython Python runtime. Strictly speaking, Cython syntax is a superset of Python syntax additionally supporting:...

 can increase the speed of Sage programs, as the Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 code is converted into C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

.

Licensing and availability

Sage is free software, distributed under the terms of the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

 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
    Live CD
    A live CD, live DVD, or live disc is a CD or DVD containing a bootable computer operating system. Live CDs are unique in that they have the ability to run a complete, modern operating system on a computer lacking mutable secondary storage, such as a hard disk drive...

     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
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 was sponsoring a native version of Sage for the Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 operating system, users of Windows currently have to use virtualization
Hardware virtualization
Computer hardware virtualization is the virtualization of computers or operating systems. It hides the physical characteristics of a computing platform from users, instead showing another abstract computing platform...

 technology such as VirtualBox
VirtualBox
Oracle VM VirtualBox is an x86 virtualization software package, originally created by software company Innotek GmbH, purchased by Sun Microsystems, and now developed by Oracle Corporation as part of its family of virtualization products...

 to run Sage under one of the aforementioned operating systems. A Cygwin
Cygwin
Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment...

 port is currently being worked on, and as of Sage 5.0, it will run on Windows.

Linux distributions in which Sage is available as a package are Mandriva
Mandriva Linux
Mandriva Linux is a Linux distribution distributed by Mandriva. It uses the RPM Package Manager...

 and Arch Linux
Arch Linux
Arch Linux is an independently developed, Linux-based operating system for i686 and x86-64 computers. It is composed predominantly of free and open source software, and supports community involvement....

. In Gentoo
Gentoo Linux
Gentoo Linux is a computer operating system built on top of the Linux kernel and based on the Portage package management system. It is distributed as free and open source software. Unlike a conventional software distribution, the user compiles the source code locally according to their chosen...

, it's available via layman in the "sage-on-gentoo" overlay. However, Sage can be installed to any Linux distribution.

Gentoo prefix
Gentoo/Alt
Gentoo/Alt is a Gentoo Linux project created to manage porting the Portage framework and other features to other operating systems, such as Mac OS X and the free BSDs...

 also provides Sage on other operating systems.

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.
|+ Mathematics packages contained in Sage>
Algebra GAP
GAP computer algebra system
GAP is a computer algebra system for computational discrete algebra with particular emphasis on computational group theory.-History:...

, Maxima, Singular
SINGULAR
SINGULAR is a computer algebra system for polynomial computations with special emphasis on the needs of commutative algebra, algebraic geometry, and singularity theory. SINGULAR is free software released under the GNU General Public License. Problems in non-commutative algebra can be tackled with...

Algebraic geometry Singular
SINGULAR
SINGULAR is a computer algebra system for polynomial computations with special emphasis on the needs of commutative algebra, algebraic geometry, and singularity theory. SINGULAR is free software released under the GNU General Public License. Problems in non-commutative algebra can be tackled with...

Arbitrary precision arithmetic MPIR
MPIR (mathematics software)
MPIR - Multiple Precision Integers and Rationals is an open source multiprecision integer library forked from the GMP project. It consists of much code from past GMP releases, in combination with much original contributed code....

, MPFR
MPFR
GNU MPFR is a portable C library for arbitrary-precision binary floating-point computation with correct rounding, based on GNU Multi-Precision Library. The computation is both efficient and has a well-defined semantics. It copies the ideas from the ANSI/IEEE-754 standard for fixed-precision...

, MPFI
MPFR
GNU MPFR is a portable C library for arbitrary-precision binary floating-point computation with correct rounding, based on GNU Multi-Precision Library. The computation is both efficient and has a well-defined semantics. It copies the ideas from the ANSI/IEEE-754 standard for fixed-precision...

, NTL
Number Theory Library
NTL is a C++ library for doing number theory. NTL supports arbitrary length integer and arbitrary precision floating point arithmetic, finite fields, vectors, matrices, polynomials, lattice basis reduction and basic linear algebra. NTL is free software released under the GNU General Public License....

, mpmath
Arithmetic geometry PARI/GP
PARI/GP
PARI/GP is a computer algebra system with the main aim of facilitating number theory computations. It is free software; versions 2.1.0 and higher are distributed under the GNU General Public License...

, NTL
Number Theory Library
NTL is a C++ library for doing number theory. NTL supports arbitrary length integer and arbitrary precision floating point arithmetic, finite fields, vectors, matrices, polynomials, lattice basis reduction and basic linear algebra. NTL is free software released under the GNU General Public License....

, mwrank
Mwrank
mwrank is one in a suite of programs for computing elliptic curves over rational numbers. Other programs in the suite compute conductors, torsion subgroups, isogenous and quadratic twists of curves. mwrank is written in C++ and is free software released under the GNU General Public...

, ecm
Lenstra elliptic curve factorization
The Lenstra elliptic curve factorization or the elliptic curve factorization method is a fast, sub-exponential running time algorithm for integer factorization which employs elliptic curves. For general purpose factoring, ECM is the third-fastest known factoring method...

Calculus Maxima, SymPy
SymPy
SymPy is a Python library for symbolic computation. The stated goals of the library are to become a full-featured computer algebra system and to keep a simple code base to promote extensibility and comprehensibility. SymPy is written in Python....

, GiNaC
GiNaC
GiNaC is a free computer algebra system released under the GNU General Public License. The name is a recursive acronym for "GiNaC is Not a CAS" . This is similar to the GNU acronym "GNU is not Unix"....

Combinatorics Symmetrica, Sage-Combinat
Linear algebra ATLAS
Automatically Tuned Linear Algebra Software
Automatically Tuned Linear Algebra Software is a software library for linear algebra. It provides a mature open source implementation of BLAS APIs for C and Fortran77....

, BLAS
Blas
Blas is mainly a Spanish given name and surname, related to Blaise. It may refer to-Places:*Piz Blas, mountain in Switzerland*San Blas , many places - see separate article, also**Cape San Blas Light, lighthouse...

, LAPACK
LAPACK
-External links:* : a modern replacement for PLAPACK and ScaLAPACK* on Netlib.org* * * : a modern replacement for LAPACK that is MultiGPU ready* on Sourceforge.net* * optimized LAPACK for Solaris OS on SPARC/x86/x64 and Linux* * *...

, NumPy, LinBox
LinBox
LinBox is a C++ template library for doing exact computational linear algebra. LinBox is free software released under the GNU Lesser General Public License....

, IML
Integer Matrix Library
IML is a C library for doing linear algebra on integers. IML is free software released under a BSD license.-External links:*...

, GSL
GNU Scientific Library
In computing, the GNU Scientific Library is a software library written in the C programming language for numerical calculations in applied mathematics and science...

Graph theory NetworkX
NetworkX
NetworkX is a Python library for studying graphs and networks. NetworkX is free software released under the BSD-new license.- Features :* Classes for graphs and digraphs.* Conversion of graphs to and from several formats....

Group theory GAP
GAP computer algebra system
GAP is a computer algebra system for computational discrete algebra with particular emphasis on computational group theory.-History:...

Numerical computation GSL
GNU Scientific Library
In computing, the GNU Scientific Library is a software library written in the C programming language for numerical calculations in applied mathematics and science...

, SciPy
SciPy
SciPy is an open source library of algorithms and mathematical tools for the Python programming language.SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and...

, NumPy, ATLAS
Automatically Tuned Linear Algebra Software
Automatically Tuned Linear Algebra Software is a software library for linear algebra. It provides a mature open source implementation of BLAS APIs for C and Fortran77....

Number theory PARI/GP
PARI/GP
PARI/GP is a computer algebra system with the main aim of facilitating number theory computations. It is free software; versions 2.1.0 and higher are distributed under the GNU General Public License...

, FLINT
Flint
Flint is a hard, sedimentary cryptocrystalline form of the mineral quartz, categorized as a variety of chert. It occurs chiefly as nodules and masses in sedimentary rocks, such as chalks and limestones. Inside the nodule, flint is usually dark grey, black, green, white, or brown in colour, and...

, NTL
Number Theory Library
NTL is a C++ library for doing number theory. NTL supports arbitrary length integer and arbitrary precision floating point arithmetic, finite fields, vectors, matrices, polynomials, lattice basis reduction and basic linear algebra. NTL is free software released under the GNU General Public License....

Statistical computing R
R (programming language)
R is a programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians for developing statistical software, and R is widely used for statistical software development and data analysis....

, SciPy
SciPy
SciPy is an open source library of algorithms and mathematical tools for the Python programming language.SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and...


|+ Other packages contained in Sage>
Command-line shell IPython
IPython
IPython is an interactive shell for the Python programming language that offers enhanced introspection, additional shell syntax, tab completion and rich history.- Other features :...

Database ZODB, Python pickles
Pickle (Python)
In the computer programming language Python, pickle is the standard mechanism for object serialization; pickling is the common term among Python programmers for serialization . Pickle uses a simple stack-based virtual machine that records the instructions used to reconstruct the object...

, SQLite
SQLite
SQLite is an ACID-compliant embedded relational database management system contained in a relatively small C programming library. The source code for SQLite is in the public domain and implements most of the SQL standard...

Graphical interface Sage Notebook, jsmath
Jsmath
jsMath is a JavaScript library for displaying mathematics in browsers in a cross-platform way. jsMath is free software released under the Apache License...

Graphics Matplotlib
Matplotlib
matplotlib is a plotting library for the Python programming language and its NumPy numerical mathematics extension. It provides an object-oriented API which allows plots to be embedded into applications using generic GUI toolkits, like wxPython, Qt, or GTK...

, Tachyon3d, GD
GD Graphics Library
The GD Graphics Library is a graphics software library by Thomas Boutell and others for dynamically manipulating images. Its native programming language is ANSI C, but it has interfaces for many other programming languages. It can create GIFs, JPEGs, PNGs, and WBMPs...

, Jmol
Jmol
Jmol is an open-source Java viewer for chemical structures in 3D,that does not require 3D acceleration plugins.Jmol returns a 3D representation of a molecule that may be used as a teaching tool, or for research e.g...

Interactive programming language Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

Networking Twisted
Twisted (software)
Twisted is an event-driven network programming framework written in Python and licensed under the MIT License.Twisted projects variously support TCP, UDP, SSL/TLS, IP Multicast, Unix domain sockets, a large number of protocols , and much more...


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]

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)

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]

  1. 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]


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)

See also

  • Comparison of computer algebra systems
  • Comparison of statistical packages
    Comparison of statistical packages
    The following tables compare general and technical information for a number of statistical analysis packages.-General information:Basic information about each product...

  • Comparison of numerical analysis software
    Comparison of numerical analysis software
    The following tables provide a comparison of numerical analysis software.- General :- Operating system support :The operating systems the software can run on natively .- Language features :Colors indicate features available as...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK