Releases: sagemath/sage
3.3
Release Tour
Sage 3.3 was released on February 21st, 2009 (changelog), 385 tickets (PRs) merged, 57 contributors. There's also a beautifully formatted version of this release tour. The following points are some of the foci of this release:
- Clean up various doctest failures from 3.2.3
- Fix some build issues from 3.2.3 on the new set of supported images
- Merge small to medium sized patches ready to go in
- Switch to MPIR for multi-precision integers and rationals
- Update the gmp-mpir spkg
- Switch to FLINT for univariate polynomial arithmetic over
Z/nZ
- Upgrade NetworkX to version 0.99 upstream release
- Upgrade cddlib to version 0.94f upstream release
- Some improvements to the lrs spkg
- Pynac interface enhancements
- Update the readline spkg
- Update the ATLAS spkg
- Upgrade ATLAS to version 3.8.3 upstream release
- Update the NTL spkg
- Upgrade M4RI to version 20090105 upstream release
- Upgrade jsMath to version 3.6 upstream release
- Upgrade GAP to version 4.4.12 upstream release
- Upgrade GUAVA to version 3.9 upstream release
- Upgrade Jmol to version 11.6 upstream release
- Upgrade matplotlib to version 0.98.5.3-svn6910 upstream release
- Upgrade libpng to version 1.2.34 upstream release
- Upgrade Sphinx to version 0.5.1 upstream release
- Upgrade bzip2 to version 1.0.5 upstream release
- Upgrade trac to version 0.11 upstream release
All tickets in the 3.3 milestone can be found on the trac server. Here's a summary of features in this release, categorized under various headings.
Algebra
- Transitivity for permutation groups (William Stein) -- In the permutation group module
permgroup.py
, the query functionis_transitive()
returns whether or not the group is transitive on[1..G.degree()]
. A few surrounding docstrings are fixed and doctest coverage for the modulesage.groups.perm_gps.permgroup.py
is now 100%. - Update the ATLAS spkg (Michael Abshoff).
- New function
is_unit()
for symbolic ring (Florent Hivert) -- The new functionsage.calculus.calculus.SymbolicExpressionRing.is_unit()
returns whether or not an element of the symbolic ring is a unit.
Algebraic Geometry
- Improved precision and performance when calculating analytic rank (William Stein) -- When calculating the analytic rank of an elliptic curve, the default is to use Cremona's
gp
script, where the precision is automatically doubled until it doesn't fail. The precision is started at 16 rather than the previous default precision. The computation is now about 3 times faster usually by starting off using this smaller precision. Here's an example:
# BEFORE
sage: E = EllipticCurve('5077a')
sage: time E.analytic_rank()
CPU times: user 0.01 s, sys: 0.01 s, total: 0.02 s
Wall time: 0.21 s
# AFTER
sage: E = EllipticCurve('5077a')
sage: time E.analytic_rank()
CPU times: user 0.02 s, sys: 0.00 s, total: 0.02 s
Wall time: 0.06 s
And another:
# BEFORE
sage: time elliptic_curves.rank(4)[0].analytic_rank()
CPU times: user 0.01 s, sys: 0.00 s, total: 0.01 s
Wall time: 0.50 s
# AFTER
sage: time elliptic_curves.rank(4)[0].analytic_rank()
CPU times: user 0.01 s, sys: 0.00 s, total: 0.01 s
Wall time: 0.33 s
- Weil pairing (David Moller Hansen, John Cremona) -- A basic framework for Weil pairing on elliptic curves using Miller's algorithm as contained in Proposition 8 of the following paper:
* Victor S. Miller. "The Weil pairing, and its efficient calculation". Journal of Cryptology, 17(4):235-261, 2004.
Basic Arithmetic
ivalue
field ininteger_mod.pyx
is no longer public (Craig Citro) -- Theivalue
field forIntegerMod_int
is no longer public. This gives about a 1.5 to 2X speed-up when multiplyingIntegerMod_ints
. Here's an example:
# BEFORE
sage: R = Integers(100) ; x = R(3) ; y = R(5)
sage: timeit('x*y')
625 loops, best of 3: 403 ns per loop
sage: timeit('x*y')
625 loops, best of 3: 370 ns per loop
sage: timeit('x*y')
625 loops, best of 3: 410 ns per loop
sage: timeit('x*y')
625 loops, best of 3: 405 ns per loop
# AFTER
sage: R = Integers(100) ; x = R(3) ; y = R(5)
sage: timeit('x*y')
625 loops, best of 3: 190 ns per loop
sage: timeit('x*y')
625 loops, best of 3: 213 ns per loop
sage: timeit('x*y')
625 loops, best of 3: 174 ns per loop
sage: timeit('x*y')
625 loops, best of 3: 191 ns per loop
- Some fixes for
is_perfect_power()
andbessel_J(0,0)
(Craig Citro, Robert Bradshaw, Robert L. Miller) -- A temporary work around for an upstream bug in GMP when usingis_perfect_power()
. Resolved a Pari interface bug when usingbessel_J(0,0)
. - Improved performance for generic polynomial rings, and for univariate polynomial arithmetic over
Z/nZ[x]
(Yann Laigle-Chapuy, Martin Albrecht, Burcin Erocal) -- Improved performance when performing modulo arithmetic between elements of a generic polynomial ring. Univariate polynomial arithmetic overZ/nZ[x]
now has considerable speed-up at approximately 20x.
# BEFORE
sage: P.<x> = PolynomialRing(GF(7))
sage: type(x)
<type 'sage.rings.polynomial.polynomial_modn_dense_ntl.Polynomial_dense_mod_p'>
sage: f = P.random_element(100)
sage: g = P.random_element(100)
sage: %timeit f*g
1000 loops, best of 3: 445 µs per loop
# AFTER
sage: P.<x> = PolynomialRing(GF(7))
sage: type(x)
<type 'sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint'>
sage: f = P.random_element(100)
sage: g = P.random_element(100)
sage: %timeit f*g
100000 loops, best of 3: 7.92 µs per loop
- Technical preview of David Harvey's
zn_poly
library exposed to the Sage library (Martin Albrecht).
def f(p,n):
P = PolynomialRing(GF(next_prime(p)),'x')
f = P.random_element(n)
g = P.random_element(n)
t0 = cputime()
r0 = f*g
t0 = cputime(t0)
t1 = cputime()
r1 = f._mul_zn_poly(g)
t1 = cputime(t1)
assert(r0 == r1)
return p,n,t0,t1
for i in range(21):
f(2**47,2**i)
returns on sage.math
# (140737488355328, 1, 0.0, 0.0)
# (140737488355328, 2, 0.0, 0.0)
# (140737488355328, 4, 0.00099999999999766942, 0.0)
# (140737488355328, 8, 0.0, 0.0)
# (140737488355328, 16, 0.0, 0.0)
# (140737488355328, 32, 0.0059990000000027521, 0.0)
# (140737488355328, 64, 0.0, 0.0)
# (140737488355328, 128, 0.0, 0.0)
# (140737488355328, 256, 0.0, 0.0)
# (140737488355328, 512, 0.0, 0.00099999999999766942)
# (140737488355328, 1024, 0.00099999999999766942, 0.0)
# (140737488355328, 2048, 0.0020000000000024443, 0.0019989999999978636)
# (140737488355328, 4096, 0.0049989999999979773, 0.005000000000002558)
# (140737488355328, 8192, 0.010998000000000729, 0.011997999999998399)
# (140737488355328, 16384, 0.023995999999996798, 0.023997000000001378)
# (140737488355328, 32768, 0.050992000000000814, 0.052991999999996153)
# (140737488355328, 65536, 0.1149820000000048, 0.10598499999999689)
# (140737488355328, 131072, 0.29195599999999189, 0.21996599999999944)
# (140737488355328, 262144, 0.6119070000000022, 0.45393199999999467)
# (140737488355328, 524288, 1.5217689999999919, 1.0278430000000043)
# (140737488355328, 1048576, 3.1365230000000111, 2.0966819999999871)
- Deprecate the function
sqrt_approx()
(David Roe) -- To obtain a numerical approximation of the square root of a ring element (integers, polynomials overGF(2^x)
, rationals), users are advised to use the functionsqrt()
with a given number of bits of precision instead. - Use Pohlig-Hellman for generic discrete logarithm (Yann Laigle-Chapuy) -- This results in significant improvement in performance and less memory foot print. Here's an example with a smooth order:
sage: factor(5^15-1)
2^2 * 11 * 31 * 71 * 181 * 1741
# BEFORE
sage: F.<a>=GF(5^15)
sage: g=F.gen()
sage: u=g^123456789
sage: time log(u,g)
CPU times: user 271.39 s, sys: 4.72 s, total: 276.11 s
Wall time: 276.96 s
123456789
sage: get_memory_usage()
378.21875
# AFTER
sage: F.<a>=GF(5^15)
sage: g=F.gen()
sage: u=g^123456789
sage: time log(u,g)
CPU times: user 0.14 s, sys: 0.00 s, total: 0.14 s
Wall time: 0.16 s
123456789
sage: get_memory_usage()
115.8984375
And here's another example with a not-so-smooth order:
sage:factor(3^13-1)
2 * 797161
# BEFORE
sage: F.<a>=GF(3**13)
sage: g=F.gen()
sage: u=g^1234567
sage: timeit('log(u,g)')
5 loops, best of 3: 1.54 s per loop
sage: get_memory_usage()
155.11328125
...
3.2.3
Release Tour
Sage 3.2.3 was released on January 5th, 2009 (changelog), 40 tickets (PRs) merged, 17 contributors. The following points are some of the foci of this release:
- Fixed performance regression in
eisenstein_submodule.py
introduced in Sage 3.2.2. - Fixed readline build troubles on OpenSUSE 11.1.
- Disabled DSage tests.
- Merged some last minute non-invasive small tickets.
Here's a summary of features in this release, categorized under various headings.
Algebra
- Powers of polynomial variables (Alex Ghitza) -- Report an error message when a determinate of a (multivariate) polynomial is raised to a fractional exponent. Previously, raising a polynomial determinate to a fractional power has the effect of rounding the exponent to an integer. As yet, fractional powers are not supported.
- Extensions of finite fields (Alex Ghitza) -- Implements methods
random_element()
andorder()
for quotients of polynomial rings. The methodorder()
returns the number of elements of a quotient ring, andrandom_element()
returns a random element of a quotient ring. - Conjugates for integer, rational and real numbers (Alex Ghitza) -- Implements trivial
conjugate()
methods for elements over the integers, rationals, and reals. Conjugates work (trivially) for matrices over rings that embed canonically into the real numbers. - Square roots of Galois field elements (John Cremona, William Stein) -- Improve the square root of an element of a Galois field
GF(2^e)
, wheree > 15
. Previously, this works fine except for the square root of 1, where 1 is an element ofGF(2^e)
fore > 15
.
Build
- Upgrade ATLAS in Sage to version 3.8.2 (Michael Abshoff) -- An update of the ATLAS spkg to the upstream version 3.8.2. This upstream version now provides: (1) better detection of Pentium D and E; (2) detect more Core 2 Duo cores; and (3) properly detect Dunnington cores. Versions 3.8.x for x < 2 sometimes detect a modern CPU architecture as an older architecture, hence causing a massive blow up in the time it takes to compile ATLAS on systems like Xeon core 2 quad, Itanium 2, and Xeon E5420.
- Update optional Sage package polymake (Michael Abshoff) -- The updated optional Sage package is polymake-2.2.p5. Earlier versions hard coded spkg versions of cddlib and gmp, and could cause polymake to break in Sage versions 3.0.3 and 3.0.4.
Coercion
- Fix performance regression in
eisenstein_submodule.py
(Robert Bradshaw) -- Performance regression ineisenstein_submodule.py
was due to cyclotomic coercion. Previously, it would take about 73.3 seconds to run all doctests ineisenstein_submodule.py
. Now, the performance is substantially increased such that all dotests ineisenstein_submodule.py
should now take about 3.4 seconds.
Doctest
- Disable DSage doctests (Michael Abshoff) -- Doctesting DSage is disabled for now due to a number of problems in the doctests. This issue is expected to be revisited in the 3.4.x series, the earliest one probably is 3.4.alpha0. It will not be considered in Sage 3.3 since that release is mainly concerned with sphinxifying the Sage documentation.
- Numerical noise in Sage 3.2.2 (Michael Abshoff) -- Compiling with GCC 4.3.2, the module
sage/rings/number_field/number_field_morphisms.pyx
exhibited numerical noise during doctesting. matrix1.pyx
reference related doctest crash (William Stein).
Graphics
- Some fixes to
matrix_plot()
and the plotting ofgamma(x)
(Mike Hansen, Robert Bradshaw). - Fix fallout in refactoring the plotting module (William Stein, Mike Hansen) -- Sage 3.2.1 refactored
plot.py
so that it was splitted up into multiple modules. However, the functions xmin/xmax/ymin/ymax were all removed without deprecating them. These are now added back exactly as before, since they are depended upon by a lot of plotting code.
Linear Algebra
- Upgrade ATLAS to version 3.8.2 (Michael Abshoff).
Miscellaneous
- Remove ancient files (Michael Abshoff) -- The following files are now removed from Sage
1. sage/functions/elementary.py
1. sage/rings/interval.py
1. sage/schemes/elliptic_curves/heegner.py
Notebook
- By default, the twisted package is no longer imported at startup (William Stein).
- Support "application shortcut" in chrome and gears (Alexander Hupfer, Timothy Clemans).
Packages
- Upgrade FLINT to version 1.0.21 (Michael Abshoff).
- Upgrade ECM to version 6.2.1 (Michael Abshoff).
Full Changelog: 3.2.2...3.2.3
3.2.2
Release Tour
Sage 3.2.2 was released on December 30, 2008 (changelog), 105 tickets (PRs) merged, 41 contributors.
Algebra
- Using Python's (version 2.5) pickling protocols (Burcin Erocal) -- Changed
sage.structure.element.Element
to use Python's pickling protocol via__getstate__()
and__setstate__()
. The previous pickling implementation insage.structure.element.make_element
is retained for backward compatibility. - Method
injvar()
is deprecated (John Palmieri) -- The methodinjvar()
insage/structure/category_object.pyx
is now deprecated. One should instead useinject_variables()
in order to make variable names available for interactive use.
Basic Arithmetic
- Fraction fields (Burcin Erocal) -- Updated the
sage.rings.fraction_field.FractionField_generic
class to the new coercion model, and Cythonize thesage.rings.fraction_field_element.FractionFieldElement
class. Homomorphisms of fraction fields now work, and therandom_element()
method of fraction fields returns sensible results.
Build
- Controlling the number of threads used for parallel testing (Dan Drake) -- Added the
NUM_THREADS
variable to the fileSAGE_ROOT/makefile
to make it easier to control the number of threads used during parallel testing. Previously the number of threads was hard coded intoSAGE_ROOT/makefile
at various places, which made the file rather difficult to maintain.
Calculus
- Derivative of a vector and a matrix (Jason Grout) -- Given a vector or matrix of differentiable expressions, the entries in that vector or matrix can be differentiated. This is handy for working with differential equations when we want to do differentiation and integration of matrices and vectors, with the exact same answer as obtained by using the
apply_map
method. - Cleaned up implementation of piecewise-defined functions (Mike Hansen, Paul Butler) -- Some updating of the class
sage/functions/piecewise.py
. This includes not explicitly using Maxima where not necessary in order to take advantage of pynac in the future. When differentiating piecewise functions where some piece uses multiplication, the expression that is passed to Maxima is properly formatted for Maxima to work with that expression.
Coercion
- A factory and pickling framework (Robert Bradshaw) -- Uniqueness of parents makes Sage operate much more smoothly. This leads to an enormous amount of nearly identical caching code scattered throughout the library. This factory handles all the caching and also provides a good pickling mechanism.
Words
- A library for studying and manipulating words (Arnaud Bergeron, Amy Glen, Sebastien Labbe, Franco Saliola) -- This adds lots of functionality for combinatorics on words. The new features are highlighted in this Sage worksheet:
WordsWorksheet.pdf
Full Changelog: 3.2.1...3.2.2
3.2.1
Release Tour
Sage 3.2.1 was released on December 1, 2008 (changelog), 120 tickets (PRs) merged, 43 contributors.
Algebra
- Divisors over integers (Robert Bradshaw) -- A much simpler and faster algorithm for the divisors function over integers. The new optimized code is faster than a similar integer divisor function in the version of PARI/GP that's bundled with Sage 3.2.1, as well as outperforming a similar integer divisor function found in the version of Magma that Sage 3.2.1 interfaces with.
- Finite field operations (John Palmieri) -- A few methods for finite field elements including additive order, p-th power, and p-th root where p is the characteristic of the field.
Basic arithmetic
- Polynomials over a field (Burcin Erocal) -- Improving the user interface of polynomial classes.
- Polynomial square roots (John Palmieri, Carl Witty) -- A method to test whether a polynomial is square over the field it is defined. If the polynomial is square, then the method has the option of returning a square root.
Build
- Improve
sage -upgrade
(William Stein, Michael Abshoff) -- The Sage upgrade command can now take an optional URL from which it will pull all spkg's, and this URL can be a Sage install. The upgrade command lists packages that will be upgraded before upgrading them, and autodownloads a new version of any spkg that hasn't successfully been installed before upgrading it. - Problematic CPU flags (William Stein, Michael Abshoff) -- Binary distributions of Sage for Linux (e.g. Ubuntu) may not work properly once installed. The following CPU flags are known to prevent Sage from running properly: sse, 3d, mmx, pni, and cmov.
Calculus
- Gamma and factorial functions (Mike Hansen, Burcin Erocal, Wilfried Huss) -- Symbolic gamma and factorial functions.
- Update to sympy-0.6.3 (Ondrej Certik) -- Update to the latest upstream of SymPy (sympy-0.6.3), which is a Python library for symbolic mathematics. For more information about SymPy, please visit http://code.google.com/p/sympy/.
- Numerical trigonometry (Robert Bradshaw) -- Optimized floating point evaluation of trigonometric functions such as sine and cosine. For example, numerical calculation of sine via fast_float is now twice as fast as math.sin.
- Floating point calculation (Robert Bradshaw) -- Changing the parsing code for numerical computation to use RDF, which is a better reflection of the underlying precision. For calculus expressions involving real numbers, redundant trailing zeros are removed.
Coercion
- Coercion API (Robert Bradshaw) -- Some simplification of the coercion interface.
Combinatorics
- Coding theory (David Joyner) -- Several changes in linear_codes.py which should speed up (and in some cases do:-) some coding theory computations considerably. It adds interfaces to Cython and C functions of Robert Miller, CJ Tjhal, and Jeffery Leon. Speed up of minimum_distance (for codes over GF(2) and GF(3)), the spectrum (=weight_distribution), and permutation_automorphism_group are expected and in most cases achieved. (Also a new function is_permutation_equivalent was added, which interfaces with Robert Miller's double coset partition refinement code.)
- Incidence structures and block designs (David Joyner) -- Beginning of an incidence structure class and an implementation of some basic block design algorithms. A few functions require GAP's Design package (which is included in gap_packages-4.4.10_6.spkg) but calling GAP or GAP's Design was only done when the corresponding Sage functionality was missing. Robert Miller's recent code on computing the automorphism group of a non-linear binary code was used to implement the automorphism group of a block design.
Finance
- Obtaining high resolution financial data (Chris Swierczewski, Brett Nakashima, William Stein) -- Refined ability to obtain weekly and daily financial data from Google Finance and Yahoo Finance. Input options, such as start date and end date, are more user-friendly. More elaborate documentation. Some support for international (read: non-NASDAQ or NYSE) stock exchanges.
Testing
- Added only_optional doctest option (William Stein) -- Added a new option
sage -t -only_optional=component
that allows one to run only the optional doctests that depend on a given component. Thus much of the optional functionality of Sage will now be much easier to automatically test.
Full Changelog: 3.2...3.2.1
3.2
Release Tour
Sage 3.2 was released on November 20th, 2008 (changelog); 183 tickets (PRs) merged, 39 contributors. For the official, comprehensive release notes, see the HISTORY.txt file that comes with the release.
Subspace generation
Robert Miller: generate all subspaces of a vector space/projective space
New Symbolics
William Stein, Burcin Erocal: high level integration of pynac into Sage
General group algebras class
David Loeffler: general group algebras class
Elliptic Curve Doctesting
Paul Zimmermann: much improved elliptic curve doctests and some bug fixes
Modular Forms
Craig Citro: huge number of small fixes to modular forms code. David Loeffler: eta product modular functions. Craig Citro: massively speed up Victor Miller basis code.
Magma Interface
William Stein: much improved Magma interface with 100% doctests
Generalized Bernoulli Numbers
William Stein: massively optimized generalized Bernoulli numbers
Modular Composition
Martin Albrecht, Paul Zimmermann: improve modular composition in GF(2)[x]
Polyhedral Improvements
Marshall Hampton: Schlegel diagrams, standard polytopes, multiplication, polars
Notebook
Timothy Clemans: notebook templatization work
Sage Build
William Stein: make it so "sage -br" does the cythonization in parallel using pyprocessing. Robert Bradshaw, Gonzalo Tonaria, Craig Citro: massively cleaned up and faster setup.py. Robert Bradshaw: update to Cython 0.10.
libSingular
Simon King, Martin Albrecht: fix memory leaks in libsingular's reduce()
Numerical Linear Algebra
Jason Grout: make numpy the backend for matrices over CDF and RDF
Graph Theory
Jason Grout: much more robust planarity testing code for graphs
Full Changelog: 3.1.2...3.2
3.1.4
Release Tour
Sage 3.1.4 was released on October 20th, 2008 (changelog), 6 tickets (PRs) merged, 5 contributors. For the official, comprehensive release notes, see the HISTORY.txt file that comes with the release.
IPython vs. init.sage startup issue
Besides some small fixes the main problem was that due to IPython changes in 3.1.3, Sage no longer started when a user had an init.sage.
Full Changelog: 3.1.3...3.1.4
3.1.3
Release Tour
Sage 3.1.3 was released on October 14th, 2008 (changelog), 125 tickets (PRs) merged, 41 contributors. For the official, comprehensive release notes, see the HISTORY.txt file that comes with the release.
ReST Documentation Preparation
Mike Hansen: inclusion of Sphinx, Docutils, Jinja, and Pygments as a step toward ReST documentation
coercion improvements
Robert Bradshaw: Move over more rings to the new coercion model.
Sage-combinat Integration
Nicolas Thiery, Mike Hansen: tighter integration with sage-combinat, i.e. the 2144 server is now installable with vanilla Sage
libSingular Improvements
Martin Albrecht: MPolynomial_libsingular improvements for number fields and ZZ
Gröbner bases over Z and Z/nZ
Martin Albrecht: Add a toy implementation for Gröbner bases over Z and Z/nZ as well as optional binding to M2's Gröbner base engine.
New Symbolics
William Stein, Burcin Erocal: add initial pynac-0.1.p0 package
Modular Symbols
William Stein, Craig Citro: optimize fast computation of hecke eigenvalues on weight 2 modular symbols for gamma0
Build Improvements
Michael Abshoff: numerous Solaris build fixes
Full Changelog: 3.1.2...3.1.3
3.1.2
Release Tour
Sage 3.1.2 was released on September 19th, 2008 (changelog), 251 tickets (PRs) merged, 42 contributors. For the official, comprehensive release notes, see the HISTORY.txt file that comes with the release.
Doctest Coverage Hits 60%
- Mike Hansen wrote doctests for almost all pexpect interfaces, which will ensure greater stability across the board.
Hidden Markov Models
- William Stein wrote Cython bindings for the GHMM C library for computing with Hidden Markov Models, which are a statistical tool that is important in machine learning, natural language processing, bioinformatics, and other areas. GHMM is also now included standard in Sage.
Notebook Bugs
- Many bugs introduced in 3.1.1 were fixed by Mike Hansen and Timothy Clemans.
- A new testing procedure was implemented, hopefully preventing regressions like in 3.1.1 in the future.
New Structures for Partition Refinement
Robert Miller
- Hypergraphs (i.e. incidence structures) -- this includes simplicial complexes and block designs
- Matrices -- the automorphism group of a matrix is the set of column permutations which leave the (unordered) set of rows unchanged
Major polytope improvements
Arnaud Bergeron and Marshall Hampton
- Triangulation code was improved (could still be better)
- Built-in polytope class was added with many standard regular polytopes and families (e.g. hypersimplices)
- New polytope methods such as polars, graphs, and Schlegel projections were added.
- Support for scalar multiplication and translation by vectors.
- Here is a demo of just some of the new functionality: https://github.com/user-attachments/assets/42d61b46-827a-450e-b035-1926795a2f4e
Improved Dense Linear Algebra over GF(2)
- M4RI (http://m4ri.sagemath.org) was updated to the newest upstream release which
- provides much improved performance for multiplication (see M4RI's "performance" page),
- provides improved performance for elimination,
- contains several build and bugfixes.
- hashs and matrix pickling was much improved (Martin Albrecht)
Before
sage: A = random_matrix(GF(2),10000,10000)
sage: A.set_immutable()
sage: %time _ = hash(A)
CPU times: user 3.96 s, sys: 0.62 s, total: 4.58 s
sage: A = random_matrix(GF(2),2000,2000)
sage: %time _ = loads(dumps(A))
CPU times: user 4.00 s, sys: 0.07 s, total: 4.07 s
After
sage: A = random_matrix(GF(2),10000,10000)
sage: A.set_immutable()
sage: %time _ = hash(A)
CPU times: user 0.02 s, sys: 0.00 s, total: 0.02 s
sage: A = random_matrix(GF(2),2000,2000)
sage: %time _ = loads(dumps(A))
CPU times: user 1.35 s, sys: 0.01 s, total: 1.37 s
- dense matrices over
$\mathbb{F}_2$ can now be written to/read from 1-bit PNG images (Martin Albrecht)
New PolyBoRi Version (0.5) and Improved Interface
- PolyBoRi was upgraded from 0.3 to 0.5rc (Tim Abbott, Michael Abshoff, Martin Albrecht)
mq.SR
now returns PolyBoRi equation systems if asked to- support for boolean polynomial interpolation was added
Example
First we create a random-ish boolean polynomial.
sage: B.<a,b,c,d,e,f> = BooleanPolynomialRing(6)
sage: f = a*b*c*e + a*d*e + a*f + b + c + e + f + 1
Now we find interpolation points mapping to zero and to one.
sage: zeros = set([(1, 0, 1, 0, 0, 0), (1, 0, 0, 0, 1, 0), \
(0, 0, 1, 1, 1, 1), (1, 0, 1, 1, 1, 1), \
(0, 0, 0, 0, 1, 0), (0, 1, 1, 1, 1, 0), \
(1, 1, 0, 0, 0, 1), (1, 1, 0, 1, 0, 1)])
sage: ones = set([(0, 0, 0, 0, 0, 0), (1, 0, 1, 0, 1, 0), \
(0, 0, 0, 1, 1, 1), (1, 0, 0, 1, 0, 1), \
(0, 0, 0, 0, 1, 1), (0, 1, 1, 0, 1, 1), \
(0, 1, 1, 1, 1, 1), (1, 1, 1, 0, 1, 0)])
sage: [f(*p) for p in zeros]
[0, 0, 0, 0, 0, 0, 0, 0]
sage: [f(*p) for p in ones]
[1, 1, 1, 1, 1, 1, 1, 1]
Finally, we find the lexicographically smallest interpolation polynomial using PolyBoRi .
sage: g = B.interpolation_polynomial(zeros, ones); g
b*f + c + d*f + d + e*f + e + 1
sage: [g(*p) for p in zeros]
[0, 0, 0, 0, 0, 0, 0, 0]
sage: [g(*p) for p in ones]
[1, 1, 1, 1, 1, 1, 1, 1]
QEPCAD Interface
Developer's Handbook
- John H Palmieri rewrote/rearranged large parts of the 'Programming Guide' (now 'Developer's Guide') which should make getting started easier for new developers.
Improved 64-bit OSX Support
Fast Numerical Integration
GAP Meataxe Interface
- In the
module matrix_group
, the methodmodule_composition_factors
interfaces with GAP's Meataxe implementation. This will return decomposition information for a G-module, for any matrix group G over a finite field (David Joyner and Simon King).
Better SymPy Integration
- Ondrej Cetrik implemented more conversions from Sage native types to SymPy native types.
Faster Determinants of Dense Matrices over Multivariate Polynomial Rings
- Martin Albrecht modified Sage to use Singular
Before
sage: P.<x,y> = QQ[]
sage: C = random_matrix(P,8,8)
sage: %time d = C.det()
CPU times: user 2.78 s, sys: 0.02 s, total: 2.80 s
After
sage: P.<x,y> = QQ[]
sage: C = random_matrix(P,8,8)
sage: %time d = C.det()
CPU times: user 0.09 s, sys: 0.00 s, total: 0.09 s
- a discussion about this issue can be found on sage-devel
Real Number Inputs Improved
- Robert Bradshaw improved real number input so that the precision is preserved better:
Before
sage: RealField(256)(1.2)
1.199999999999999955591079014993738383054733276367187500000000000000000000000
After
sage: RealField(256)(1.2)
1.200000000000000000000000000000000000000000000000000000000000000000000000000
Arrow drawing improved
- Jason Grout redid the arrows to look nicer and behave better with graphs:
sage: g = DiGraph({0:[1,2,3],1:[0,3,4], 3:[4,6]})
sage: show(g)
Eigen functions for matrices
- Jason Grout added a few standard functions to compute eigenvalues and left and right eigenvectors, returning exact results in QQbar.
sage: a = matrix(QQ, 4, range(16)); a
[ 0 1 2 3]
[ 4 5 6 7]
[ 8 9 10 11]
[12 13 14 15]
sage: a.eigenvalues()
[0, 0, -2.464249196572981?, 32.46424919657298?]
sage: a.eigenvectors_right()
[(0, [
(1, 0, -3, 2),
(0, 1, -2, 1)
], 2),
(-2.464249196572981?,
[(1, 0.3954107716733585?, -0.2091784566532830?, -0.8137676849799244?)],
1),
(32.46424919657298?,
[(1, 2.890303514040928?, 4.780607028081855?, 6.670910542122782?)],
1)]
sage: D,P=a.eigenmatrix_right()
sage: P
[ 1 0 1 1]
[ 0 1 0.3954107716733585? 2.890303514040928?]
[ -3 -2 -0.2091784566532830? 4.780607028081855?]
[ 2 1 -0.8137676849799244? 6.670910542122782?]
sage: D
[ 0 0 0 0]
[ 0 0 0 0]
[ 0 0 -2.464249196572981? 0]
[ 0 0 0 32.46424919657298?]
sage: a*P==P*D
True
The question marks at the end of the numbers in the previous example mean that Sage is printing out an approximation of an exact value that it uses. In particular, the question mark means that the last digit can vary by plus or minus 1. In other words, 32.46424919657298? means that the exact number is really between 32.46424919657297 and 32.46424919657299. Sage knows what the exact number is and uses the exact number in calculations.
Full Changelog: 3.1.1...3.1.2
3.1.1
Sage 3.1.1 (released Aug 17, 2008; changelog)
See Sage 3.1 for the feature tour. The 3.1.1 release was a bug fix release that fixed one critical bug in Sage 3.1.
Full Changelog: 3.1...3.1.1
3.1
Release Tour
Sage 3.1.1 was released on August 17th, 2008 (changelog)
114 tickets (PRs) merged, 44 contributors). For the official, comprehensive release notes, see the HISTORY.txt file that comes with the release.
New Coercion Infrastructure
Robert Bradshaw, David Roe: new coercion model
Graph and Plotting Improvements
Arnaud Bergeron, Jason Grout, Robert Miller, Franco Saliola
- (Robert Miller, Franco Saliola) Automatic plotting of trees and posets.
Major Update to Root Systems
Dan Bump, Nicolas Thiery, Nicolas Borie, Mike Hansen
Steenrod Algebra Calculations
John Palmieri
Notebook improvements
Timothy Clemans
Free Modules Revision
David Kohel
Multimodular Algorithm for Bernoulli Numbers
David Harvey
Partition Refinement
Robert Miller
- Generalized the existing algorithms for graphs and binary codes, rewrote algorithm to be substantially more legible and maintainable.
Integral Point Finding for Elliptic Curves over Q
Tobias Nagel, Michael Mardaus, John Cremona
- Integral points on elliptic curves over Q: done, in 3.1.1
- S-integral points on elliptic curves over Q: in progress
New sage_input Function
Carl Witty
New printing for intervals and QQbar elements
Carl Witty
Sage 3.1.1 introduces a new way to print intervals and QQbar elements:
sage: QQbar(sqrt(2))
1.414213562373095?
The question mark syntax indicates that the real value is within 1.414213562373094 and 1.414213562373096 (that the last digit could vary by up to plus or minus one). For QQbar elements, Sage knows the real value and uses that value in calculations.
Full Changelog: 3.0.5...3.1