Sage 3.1.2 Release Tour

Sage 3.1.2 was released on September 19th, 2008. For the official, comprehensive release notes, see the HISTORY.txt file that comes with the release. For the latest changes see sage-3.1.2.txt.

Doctest Coverage Hits 60%

Hidden Markov Models

Notebook Bugs

New Structures for Partition Refinement

Robert Miller

Major polytope improvements

Arnaud Bergeron and Marshall Hampton

Improved Dense Linear Algebra over GF(2)

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

New PolyBoRi Version (0.5) and Improved Interface

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

Improved 64-bit OSX Support

Fast Numerical Integration

GAP Meataxe Interface

Better SymPy Integration

Faster Determinants of Dense Matrices over Multivariate Polynomial Rings

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

Real Number Inputs Improved

Before

sage: RealField(256)(1.2)
1.199999999999999955591079014993738383054733276367187500000000000000000000000

After

sage: RealField(256)(1.2)
1.200000000000000000000000000000000000000000000000000000000000000000000000000

Arrow drawing improved

sage: g = DiGraph({0:[1,2,3],1:[0,3,4], 3:[4,6]})
sage: show(g)

Eigen functions for matrices

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.

ReleaseTours/sage-3.1.2 (last edited 2009-12-26 14:45:46 by Minh Nguyen)