€csage.server.notebook.notebook Notebook q)q}q(U_Notebook__ulimitqUUsecureq‰U_Notebook__log_serverq‰U_Notebook__filenameqU2/home/was/talks/20070817-ccr/sage_notebook/nb.sobjqU_Notebook__confq (csage.server.notebook.server_conf ServerConfiguration q oq }q Uconfsq }q(Unumber_of_backupsqKUword_wrap_colsqKHU idle_timeoutqKxU save_intervalqKUidle_check_intervalqKusbU_Notebook__server_logq]qU_Notebook__accountsq‰U_Notebook__systemqNUportqM@U_Notebook__worksheetsq}qUadmin/0q(csage.server.notebook.worksheet Worksheet qoq}q(U_Worksheet__filenameqhU_Worksheet__ownerq Uadminq!U_Worksheet__cellsq"]q#((csage.server.notebook.cell Cell q$oq%}q&(U _Cell__inq'U2 + 3q(U_Cell__introspect_htmlq)U!
q*U_Cell__worksheetq+hU_Cell__completionsq,‰U_Cell__introspectq-‰U_Cell__out_htmlq.UU	_Cell__idq/KU_Cell__is_htmlq0‰U_before_preparseq1UWos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/0")
2 + 3q2U
_Cell__outq3U5Uhas_new_outputq4‰U_Cell__sageq5NU_Cell__versionq6KU_Cell__typeq7Uwrapq8U_Cell__timeq9‰U_Cell__interruptedq:‰ub(h$oq;}q<(h'Uh+hh,‰h.Uh/Kh3Uh4‰h6Kh7h8h:‰ub(h$oq=}q>(h'Ushow(plot(sin(x^2), 0, pi))q?h)U!
q@h+hh,‰h-‰h.U-qAh/Kh0‰h1Umos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/1")
show(plot(sin(x^2), 0, pi))qBh3Uh4‰h5Nh6Kh7h8U_Cell__url_to_selfqCU/home/admin/0/cells/1qDh9‰h:‰ub(h$oqE}qF(h'Uh+hh,‰h.Uh/Kh3Uh4‰h6Kh7h8h:‰ub(h$oqG}qH(h'Ua = integrate(sin(x^2),x); aqIh)U!
qJh+hh,‰h-‰h.Uh/Kh0‰h1Unos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/2")
a = integrate(sin(x^2),x); aqKh3Uz
sqrt(pi)*((sqrt(2)*I + sqrt(2))*erf((sqrt(2)*I + sqrt(2))*x/2) + (sqrt(2)*I - sqrt(2))*erf((sqrt(2)*I - sqrt(2))*x/2))/8
qLh4‰h5csage.interfaces.sage0
reduce_load_Sage
qM)RqNh6Kh7UwrapqOh9‰h:‰ub(h$oqP}qQ(h'Ushow(a)qRh)U!
qSh+hh,‰h-‰h.Uh/Kh0‰h1UYos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/3")
show(a)qTh3T¥
\frac{{\sqrt{ \pi } \cdot \left( {\left( {\sqrt{ 2 } \cdot i} + \sqrt{ 2 } \right) \cdot \left( \text{erf} \left( \frac{{\left( {\sqrt{ 2 } \cdot i} + \sqrt{ 2 } \right) \cdot x}}{2} \right) \right)} + {\left( {\sqrt{ 2 } \cdot i} - \sqrt{ 2 } \right) \cdot \left( \text{erf} \left( \frac{{\left( {\sqrt{ 2 } \cdot i} - \sqrt{ 2 } \right) \cdot x}}{2} \right) \right)} \right)}}{8}
qUh4‰h5hNh6Kh7h8hCU/home/admin/0/cells/3qVh9‰h:‰ub(h$oqW}qX(h'Uh+hh,‰h.Uh/Kh3Uh4‰h6Kh7h8h:‰ub(h$oqY}qZ(h'Um = random_matrix(QQ,5)^(-1); mq[h)U!
q\h+hh,‰h-‰h.Uh/K
h0‰h1Uros.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/10")
m = random_matrix(QQ,5)^(-1); mq]h3Uˆ
[  -3   -2   -3   -2    1]
[  -5   -4   -6   -4    2]
[-3/2   -1   -1   -1  1/2]
[   0 -1/2 -1/2    0    0]
[   1    1    1    1    0]
q^h4‰h5hNh6Kh7h8hCU/home/admin/0/cells/10q_h9‰h:‰ub(h$oq`}qa(h'U#m.[tab]qbh)U!
qch+hh,‰h-‰h.Uh/Kh0‰h1U[os.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/20")
#m.[tab]qdh3U
h4‰h5hNh6Kh7Uwrapqeh9‰h:‰ub(h$oqf}qg(h'Ulatex(m)qhh)U!
qih+hh,‰h-‰h.Uh/Kh0‰h1U[os.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/11")
latex(m)qjh3UŸ
\left(\begin{array}{rrrrr}
-3&-2&-3&-2&1\\
-5&-4&-6&-4&2\\
-\frac{3}{2}&-1&-1&-1&\frac{1}{2}\\
0&-\frac{1}{2}&-\frac{1}{2}&0&0\\
1&1&1&1&0
\end{array}\right)
qkh4‰h5hNh6Kh7h8h9‰h:‰ub(h$oql}qm(h'Ushow(m)qnh)U!
qoh+hh,‰h-‰h.Uh/Kh0‰h1UZos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/12")
show(m)qph3UÄ
\left(\begin{array}{rrrrr} -3&-2&-3&-2&1\\ -5&-4&-6&-4&2\\ -\frac{3}{2}&-1&-1&-1&\frac{1}{2}\\ 0&-\frac{1}{2}&-\frac{1}{2}&0&0\\ 1&1&1&1&0 \end{array}\right)
qqh4‰h5hNh6Kh7h8hCU/home/admin/0/cells/12qrh9‰h:‰ub(h$oqs}qt(h'Uh+hh,‰h.Uh/Kh3Uh4‰h6Kh7h8h:‰ub(h$oqu}qv(h'U#time n = number_of_partitions(10^8)qwh)U!
qxh+hh,‰h-‰h.Uh/Kh0‰h1U›os.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/4")
__SAGE_t__=cputime()
__SAGE_w__=walltime()
n = number_of_partitions(10^8)qyh3U$CPU time: 6.01 s,  Wall time: 8.28 sqzh4‰h5Nh6Kh7Uwrapq{h9ˆh:‰ub(h$oq|}q}(h'U/%mathematica
Timing[N[Log[PartitionsP[10^8]]]]q~h)U!
qh+hh,‰h-‰h.Uh/Kh0‰h1U€os.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/6")
%mathematica
Timing[N[Log[PartitionsP[10^8]]]]q€h3U {13.6169, 25630.640277658734642}qh4‰h5Nh6Kh7h8hCU/home/admin/0/cells/6q‚h9‰h:‰ub(h$oqƒ}q„(h'Uh+hh,‰h.Uh/Kh3Uh4‰h6Kh7h8h:‰ub(h$oq…}q†(h'UIe = EllipticCurve([1,2,3,4,5])
print e.aplist(20)
time n = e.aplist(10^6)q‡h)U!
qˆh+hh,‰h-‰h.Uh/K
h0‰h1Uœos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/13")
e = EllipticCurve([1,2,3,4,5])
print e.aplist(20)
time n = e.aplist(10^6)q‰h3U<
[1, 0, -3, -1, -1, 1, 5, 4]
Time: CPU 3.68 s, Wall: 5.30 s
qŠh4‰h5hNh6Kh7Uwrapq‹h9‰h:‰ub(h$oqŒ}q(h'U€%magma
print GetVersion();
E := EllipticCurve([1,2,3,4,5]);
print TracesOfFrobenius(E, 20);
time n := TracesOfFrobenius(E,10^6);qŽh)U!
qh+hh,‰h-‰h.Uh/Kh0‰h1UÒos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/5")
%magma
print GetVersion();
E := EllipticCurve([1,2,3,4,5]);
print TracesOfFrobenius(E, 20);
time n := TracesOfFrobenius(E,10^6);qh3U4
2 13 10

[ 1, 0, -3, -1, -1, 1, 5, 4 ]
Time: 8.570
q‘h4‰h5hNh6Kh7h8hCU/home/admin/0/cells/5q’h9‰h:‰ub(h$oq“}q”(h'Uh+hh,‰h.Uh/Kh3Uh4‰h6Kh7h8h:‰ub(h$oq•}q–(h'U>var('a,b,c,X')
s = solve(a*X^2 + b*X + c == 0, X)
show(s[0])q—h)U!
q˜h+hh,‰h-‰h.Uh/K	h0‰h1UŽos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/9")
var('a,b,c,X')
s = solve(a*X^2 + b*X + c == 0, X)
show(s[0])q™h3Um
X = \frac{-\sqrt{ {b}^{2} - {{4 \cdot a} \cdot c} } - b}{{2 \cdot a}}
qšh4‰h5Nh6Kh7h8hCU/home/admin/0/cells/9q›h9‰h:‰ub(h$oqœ}q(h'U+%mathematica Solve[a*X^2 + b*X +c == 0, X]qžh)U!
qŸh+hh,‰h-‰h.Uh/Kh0‰h1U|os.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/8")
%mathematica
Solve[a*X^2 + b*X +c == 0, X]q h3Uá2                             2
               -b - Sqrt[b  - 4 a c]         -b + Sqrt[b  - 4 a c]
        {{X -> ---------------------}, {X -> ---------------------}}
                        2 a                           2 aq¡h4‰h5Nh6Kh7h8h9‰h:‰ub(h$oq¢}q£(h'U]# In SAGE
a = random_matrix(ZZ,300, x=-9, y=9)
time f = a.charpoly()
print log(abs(f[0])*1.0)q¤h)U!
q¥h+hh,‰h-‰h.Uh/Kh9‰h0‰h1U¯os.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/7")
# In SAGE
a = random_matrix(ZZ,300, x=-9, y=9)
time f = a.charpoly()
print log(abs(f[0])*1.0)q¦h3U3
Time: CPU 10.04 s, Wall: 13.03 s
1200.38548128654
q§h4‰h6Kh7h8h5hM)Rq¨h:‰ub(h$oq©}qª(h'U«%magma
n := 300;
a := MatrixAlgebra(IntegerRing(), n)![Random(-9,9) : i in [1..n^2]];
time f := CharacteristicPolynomial(a);
print Log(AbsoluteValue(Coefficient(f,0))*1.0)q«h)U!
q¬h+hh,‰h-‰h.Uh/Kh0‰h1Uþos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/14")
%magma
n := 300;
a := MatrixAlgebra(IntegerRing(), n)![Random(-9,9) : i in [1..n^2]];
time f := CharacteristicPolynomial(a);
print Log(AbsoluteValue(Coefficient(f,0))*1.0)q­h3U/


Time: 7.640
1214.76576501968242382405874440
q®h4‰h5h¨h6Kh7h8h9‰h:‰ub(h$oq¯}q°(h'U`# In SAGE
n = 100
a = random_matrix(QQ,n, n+1, num_bound=2^64, den_bound=1)
time a.echelonize()
q±h)U!
q²h+hh,‰h-‰h.Uh/Kh0‰h1U²os.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/15")
# In SAGE
n = 100
a = random_matrix(QQ,n, n+1, num_bound=2^64, den_bound=1)
time a.echelonize()q³h3U 
Time: CPU 0.31 s, Wall: 0.41 s
q´h4‰h5h¨h6K	h7h8hCU/home/admin/0/cells/15qµh9‰h:‰ub(h$oq¶}q·(h'Uy%magma
n := 100;
a := RMatrixSpace(RationalField(), n,n+1)![Random(1,2^64): i in [1..n*(n+1)]];
time e := EchelonForm(a);q¸h)U!
q¹h+hh,‰h-‰h.Uh/Kh0‰h1UÌos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/26")
%magma
n := 100;
a := RMatrixSpace(RationalField(), n,n+1)![Random(1,2^64): i in [1..n*(n+1)]];
time e := EchelonForm(a);qºh3U


Time: 6.390
q»h4‰h5h¨h6Kh7h8hCU/home/admin/0/cells/26q¼h9‰h:‰ub(h$oq½}q¾(h'U`# In SAGE
n = 200
a = random_matrix(QQ,n, n+1, num_bound=2^64, den_bound=1)
time a.echelonize()
q¿h)U!
qÀh+hh,‰h-‰h.Uh/Kh0‰h1U²os.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/27")
# In SAGE
n = 200
a = random_matrix(QQ,n, n+1, num_bound=2^64, den_bound=1)
time a.echelonize()qÁh3U 
Time: CPU 1.96 s, Wall: 3.22 s
qÂh4‰h5h¨h6Kh7h8h9‰h:‰ub(h$oqÃ}qÄ(h'Uy%magma
n := 200;
a := RMatrixSpace(RationalField(), n,n+1)![Random(1,2^64): i in [1..n*(n+1)]];
time e := EchelonForm(a);qÅh)U!
qÆh+hh,‰h-‰h.Uh/Kh0‰h1UÌos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/29")
%magma
n := 200;
a := RMatrixSpace(RationalField(), n,n+1)![Random(1,2^64): i in [1..n*(n+1)]];
time e := EchelonForm(a);qÇh3U


Time: 159.920
qÈh4‰h5h¨h6Kh7h8h9‰h:‰ub(h$oqÉ}qÊ(h'U159.920 / 3.22qËh)U!
qÌh+hh,‰h-‰h.Uh/Kh0‰h1Uaos.chdir("/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/cells/30")
159.920 / 3.22qÍh3U
49.6645962732919
qÎh4‰h5h¨h6Kh7h8h9‰h:‰ub(h$oqÏ}qÐ(h'Uh+hh,‰h.Uh/Kh3Uh4‰h6Kh7h8h:‰ubeU_Worksheet__synchroqÑKZU_Worksheet__comp_is_runningqÒ‰U_Worksheet__dirqÓU=/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0qÔU_Worksheet__last_autosaveqÕGAѱn½·}åU_Worksheet__attachedqÖ}q×U/home/was/.sage/init.sageqØGAÑ¢m€sU_Worksheet__sageqÙh¨U_Worksheet__user_viewqÚ}qÛh!KsU_Worksheet__queueqÜ]qÝU_Worksheet__next_idqÞK U_Worksheet__docbrowserq߉U_Worksheet__viewersqà]qáU!_Worksheet__last_compute_walltimeqâGAѱo£äæâU_Worksheet__nameqãU
Quick DemoqäU_Worksheet__next_block_idqåK]U_Worksheet__systemqæUsageqçU_Worksheet__collaboratorsqè]qéU_Worksheet__saved_by_infoqê}që(U
1187361716qìh!U
1187361888qíh!U
1187362291qîh!U
1187362485qïh!U
1187363550qðh!U
1187362700qñh!U
1187361520qòh!U
1187362092qóh!U
1187363574qôh!U
1187361901qõh!uU_Worksheet__last_editedqöGAѱn½·}[h!†q÷ubsU_default_filenameqøU2/home/was/talks/20070817-ccr/sage_notebook/nb.sobjqùU_Notebook__history_countqúKU_Notebook__server_poolqû]qüU_Notebook__object_dirqýU2/home/was/talks/20070817-ccr/sage_notebook/objectsqþU_Notebook__show_debugqÿ‰U_Notebook__backup_dirrUsage_notebook/backups/rU_Notebook__historyr]rU_Notebook__worksheet_dirrU5/home/was/talks/20070817-ccr/sage_notebook/worksheetsrU_Notebook__adminsr]rU_Notebook__usersr}r	h!(csage.server.notebook.user
User
r
or}r(U_User__emailr
UU_User__confr(csage.server.notebook.user_conf
UserConfiguration
ror}rUconfsr}r(Udefault_systemrUsagerUmax_history_lengthrMôUautosave_intervalrK´usbU_User__account_typerUuserrU_User__passwordrU
aaQSqAReePlq6rU_User__usernamerh!Uhistoryr]r(UEWorksheet 'Quick Demo' (2007-08-17 at 07:38)
{{{id=0|
2 + 3
///
5
}}}rU‰Worksheet 'Quick Demo' (2007-08-17 at 07:39)
{{{id=1|
show(plot(sin(x^2), 0, pi)))
///
Syntax Error:
    show(plot(sin(x^2), 0, pi)))
}}}r UUWorksheet 'Quick Demo' (2007-08-17 at 07:39)
{{{id=1|
show(plot(sin(x^2), 0, pi))
}}}r!UÌWorksheet 'Quick Demo' (2007-08-17 at 07:39)
{{{id=2|
integrate(sin(x^2),x)
///
sqrt(pi)*((sqrt(2)*I + sqrt(2))*erf((sqrt(2)*I + sqrt(2))*x/2) + (sqrt(2)*I - sqrt(2))*erf((sqrt(2)*I - sqrt(2))*x/2))/8
}}}r"TüWorksheet 'Quick Demo' (2007-08-17 at 07:39)
{{{id=3|
show(integrate(sin(x^2),x))
///
\frac{{\sqrt{ \pi } \cdot \left( {\left( {\sqrt{ 2 } \cdot i} + \sqrt{ 2 } \right) \cdot \left( \text{erf} \left( \frac{{\left( {\sqrt{ 2 } \cdot i} + \sqrt{ 2 } \right) \cdot x}}{2} \right) \right)} + {\left( {\sqrt{ 2 } \cdot i} - \sqrt{ 2 } \right) \cdot \left( \text{erf} \left( \frac{{\left( {\sqrt{ 2 } \cdot i} - \sqrt{ 2 } \right) \cdot x}}{2} \right) \right)} \right)}}{8}
}}}r#U†Worksheet 'Quick Demo' (2007-08-17 at 07:40) {{{id=4| time n = number_of_partitions(10^8) /// CPU time: 6.01 s, Wall time: 8.28 s }}}r$UWorksheet 'Quick Demo' (2007-08-17 at 07:41) {{{id=5| %magma E := EllipticCurve([1,2,3,4,5]); TracesOfFrobenius(E, 20) /// [ 1, 0, -3, -1, -1, 1, 5, 4 ] }}}r%U¹Worksheet 'Quick Demo' (2007-08-17 at 07:41) {{{id=5| %magma print GetVersion(); E := EllipticCurve([1,2,3,4,5]); TracesOfFrobenius(E, 20) /// 2 13 10 [ 1, 0, -3, -1, -1, 1, 5, 4 ] }}}r&U¹Worksheet 'Quick Demo' (2007-08-17 at 07:41) {{{id=5| %magma print GetVersion(); E := EllipticCurve([1,2,3,4,5]); TracesOfFrobenius(E, 20) /// 2 13 10 [ 1, 0, -3, -1, -1, 1, 5, 4 ] }}}r'UÏWorksheet 'Quick Demo' (2007-08-17 at 07:41) {{{id=6| %mathematics NumberOfPartitions[10^3] /// Traceback (most recent call last): NumberOfPartitions[10^3] NameError: name 'mathematics' is not defined }}}r(U„Worksheet 'Quick Demo' (2007-08-17 at 07:42) {{{id=6| %mathematica NumberOfPartitions[10^3] /// NumberOfPartitions[1000] }}}r)U€Worksheet 'Quick Demo' (2007-08-17 at 07:42) {{{id=6| %mathematica NumberPartitions[10^3] /// NumberPartitions[1000] }}}r*UvWorksheet 'Quick Demo' (2007-08-17 at 07:42) {{{id=6| %mathematica NPartitions[10^3] /// NPartitions[1000] }}}r+UxWorksheet 'Quick Demo' (2007-08-17 at 07:42) {{{id=6| %mathematica NPartitionsP[10^3] /// NPartitionsP[1000] }}}r,U…Worksheet 'Quick Demo' (2007-08-17 at 07:42) {{{id=6| %mathematica PartitionsP[10^3] /// 24061467864032622473692149727991 }}}r-U…Worksheet 'Quick Demo' (2007-08-17 at 07:42) {{{id=6| %mathematica PartitionsP[10^3] /// 24061467864032622473692149727991 }}}r.U“Worksheet 'Quick Demo' (2007-08-17 at 07:42) {{{id=6| %mathematica Timing[PartitionsP[10^3]] /// {0., 24061467864032622473692149727991} }}}r/TüWorksheet 'Quick Demo' (2007-08-17 at 07:42) {{{id=6| %mathematica Timing[PartitionsP[10^5]] /// {0.432027, 2749351056977569651267751632098635268817342931598005475820 > 31259843021473281149641730550507416607366215901578447742962489404930630 > 70200461792764493033510116079342457190155718943509725312466108452006369 > 55893446424871682878983218234500926285383140459702130713067451062441922 > 73112389997022844086093709355316296978515695698921961084801586005694210 > 98519} }}}r0U}Worksheet 'Quick Demo' (2007-08-17 at 07:43) {{{id=6| %mathematica Timing[n := PartitionsP[10^6];] /// {0., Null} }}}r1U}Worksheet 'Quick Demo' (2007-08-17 at 07:43) {{{id=6| %mathematica Timing[n := PartitionsP[10^6]] /// {0., Null} }}}r2T0Worksheet 'Quick Demo' (2007-08-17 at 07:43) {{{id=6| %mathematica Timing[PartitionsP[10^6]] /// {0.896056, 147168498635822339863100476060989594348403048443914212533 > 46127473516661174189186182763301488739835975558420153741306002880959293 > 87347128232270327849578001932784396072064228659048713020170971840761025 > 67647986084690814282935670692978599129051989944549067221999782345287498 > 29740222882298501367675662947818874946878790038246999881977292006320686 > 6873599666227381679826621348241720844663102742800191813... }}}r3U³Worksheet 'Quick Demo' (2007-08-17 at 07:43) {{{id=6| %mathematica Timing[N[Log[PartitionsP[10^6]]]] /// -17 {1.01915 10 , 2549.348105937980440} }}}r4U•Worksheet 'Quick Demo' (2007-08-17 at 07:43) {{{id=6| %mathematica Timing[N[Log[PartitionsP[10^6]]]] /// {0.704044, 2549.348105937980440} }}}r5U•Worksheet 'Quick Demo' (2007-08-17 at 07:43) {{{id=6| %mathematica Timing[N[Log[PartitionsP[10^8]]]] /// {13.6169, 25630.640277658734642} }}}r6TdWorksheet 'Quick Demo' (2007-08-17 at 07:44) {{{id=8| %mathematica Solve[a*X^2 + b*X +c == 0, X] /// 2 2 -b - Sqrt[b - 4 a c] -b + Sqrt[b - 4 a c] {{X -> ---------------------}, {X -> ---------------------}} 2 a 2 a }}}r7UµWorksheet 'Quick Demo' (2007-08-17 at 07:44) {{{id=9| var('a,b,c,X') solve(a*X^2 + b*X + c == 0, X) /// [X == (-sqrt(b^2 - 4*a*c) - b)/(2*a), X == (sqrt(b^2 - 4*a*c) - b)/(2*a)] }}}r8UèWorksheet 'Quick Demo' (2007-08-17 at 07:44) {{{id=9| var('a,b,c,X') s = solve(a*X^2 + b*X + c == 0, X) show(s[0]) ///
X = \frac{-\sqrt{ {b}^{2} - {{4 \cdot a} \cdot c} } - b}{{2 \cdot a}}
}}}r9UÓWorksheet 'Quick Demo' (2007-08-17 at 07:45) {{{id=2| a = integrate(sin(x^2),x); a /// sqrt(pi)*((sqrt(2)*I + sqrt(2))*erf((sqrt(2)*I + sqrt(2))*x/2) + (sqrt(2)*I - sqrt(2))*erf((sqrt(2)*I - sqrt(2))*x/2))/8 }}}r:TèWorksheet 'Quick Demo' (2007-08-17 at 07:45) {{{id=3| show(a) ///
\frac{{\sqrt{ \pi } \cdot \left( {\left( {\sqrt{ 2 } \cdot i} + \sqrt{ 2 } \right) \cdot \left( \text{erf} \left( \frac{{\left( {\sqrt{ 2 } \cdot i} + \sqrt{ 2 } \right) \cdot x}}{2} \right) \right)} + {\left( {\sqrt{ 2 } \cdot i} - \sqrt{ 2 } \right) \cdot \left( \text{erf} \left( \frac{{\left( {\sqrt{ 2 } \cdot i} - \sqrt{ 2 } \right) \cdot x}}{2} \right) \right)} \right)}}{8}
}}}r;TÅWorksheet 'Quick Demo' (2007-08-17 at 07:45) {{{id=10| latex(a) /// \frac{{\sqrt{ \pi } \cdot \left( {\left( {\sqrt{ 2 } \cdot i} + \sqrt{ 2 } \right) \cdot \left( \text{erf} \left( \frac{{\left( {\sqrt{ 2 } \cdot i} + \sqrt{ 2 } \right) \cdot x}}{2} \right) \right)} + {\left( {\sqrt{ 2 } \cdot i} - \sqrt{ 2 } \right) \cdot \left( \text{erf} \left( \frac{{\left( {\sqrt{ 2 } \cdot i} - \sqrt{ 2 } \right) \cdot x}}{2} \right) \right)} \right)}}{8} }}}r<U±Worksheet 'Quick Demo' (2007-08-17 at 07:45) {{{id=10| m = random_matrix(QQ,4); m /// [ 0 0 1/2 0] [ 2 1 -2 1] [ 1/2 0 -1 -1/2] [ 0 -2 1 -1] }}}r=U½Worksheet 'Quick Demo' (2007-08-17 at 07:45) {{{id=11| latex(m) /// \left(\begin{array}{rrrr} 0&0&\frac{1}{2}&0\\ 2&1&-2&1\\ \frac{1}{2}&0&-1&-\frac{1}{2}\\ 0&-2&1&-1 \end{array}\right) }}}r>UáWorksheet 'Quick Demo' (2007-08-17 at 07:45) {{{id=12| show(m) ///
\left(\begin{array}{rrrr} 0&0&\frac{1}{2}&0\\ 2&1&-2&1\\ \frac{1}{2}&0&-1&-\frac{1}{2}\\ 0&-2&1&-1 \end{array}\right)
}}}r?U¶Worksheet 'Quick Demo' (2007-08-17 at 07:45) {{{id=10| m = random_matrix(QQ,4)^(-1); m /// [ 1/2 1/4 0 2] [ -1 -1/2 0 -2] [-1/2 -1/4 -1/2 -1] [ 1/2 -3/4 1/2 1] }}}r@T*Worksheet 'Quick Demo' (2007-08-17 at 07:45) {{{id=10| m = random_matrix(QQ,4)^(-1); m /// Traceback (most recent call last): File "", line 1, in File "/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/code/34.py", line 4, in exec compile(ur'm = random_matrix(QQ,Integer(4))**(-Integer(1)); m' + '\n', '', 'single') File "/home/was/s/local/lib/python2.5/site-packages/zope.interface-3.3.0-py2.5-linux-i686.egg/", line 1, in File "matrix0.pyx", line 2195, in matrix0.Matrix.__pow__ F... }}}rAUÆWorksheet 'Quick Demo' (2007-08-17 at 07:46) {{{id=10| m = random_matrix(QQ,4)^(-1); m /// [ 2 4 2 0] [ 0 2 1 0] [ 2/3 -1/3 0 1/3] [ -4/3 -10/3 -2 1/3] }}}rBUåWorksheet 'Quick Demo' (2007-08-17 at 07:46) {{{id=10| m = random_matrix(QQ,5)^(-1); m /// [ -3 -2 -3 -2 1] [ -5 -4 -6 -4 2] [-3/2 -1 -1 -1 1/2] [ 0 -1/2 -1/2 0 0] [ 1 1 1 1 0] }}}rCUåWorksheet 'Quick Demo' (2007-08-17 at 07:46) {{{id=11| latex(m) /// \left(\begin{array}{rrrrr} -3&-2&-3&-2&1\\ -5&-4&-6&-4&2\\ -\frac{3}{2}&-1&-1&-1&\frac{1}{2}\\ 0&-\frac{1}{2}&-\frac{1}{2}&0&0\\ 1&1&1&1&0 \end{array}\right) }}}rDT Worksheet 'Quick Demo' (2007-08-17 at 07:46) {{{id=12| show(m) ///
\left(\begin{array}{rrrrr} -3&-2&-3&-2&1\\ -5&-4&-6&-4&2\\ -\frac{3}{2}&-1&-1&-1&\frac{1}{2}\\ 0&-\frac{1}{2}&-\frac{1}{2}&0&0\\ 1&1&1&1&0 \end{array}\right)
}}}rEU†Worksheet 'Quick Demo' (2007-08-17 at 07:47) {{{id=13| e = EllipticCurve([1,2,3,4,5]) e.aplist(20) /// [1, 0, -3, -1, -1, 1, 5, 4] }}}rFT‰Worksheet 'Quick Demo' (2007-08-17 at 07:47) {{{id=5| %magma print GetVersion(); E := EllipticCurve([1,2,3,4,5]); print TracesOfFrobenius(E, 20); time n := TraceOfFrobenius(E,10^6); /// Traceback (most recent call last): time n := TraceOfFrobenius(E,10^6); File "/home/was/s/local/lib/python2.5/site-packages/sage/server/support.py", line 255, in syseval return system.eval(cmd) File "/home/was/s/local/lib/python2.5/site-packages/sage/interfaces/magma.py", line 264, in eval raise RuntimeError, "Error evaluation Magma code.\nIN:%s\nOUT:%s"%(x, ans) RuntimeError: Error evaluation Magma code. IN:print GetVersion(); E := Ellip... }}}rGUñWorksheet 'Quick Demo' (2007-08-17 at 07:47) {{{id=5| %magma print GetVersion(); E := EllipticCurve([1,2,3,4,5]); print TracesOfFrobenius(E, 20); time n := TracesOfFrobenius(E,10^6); /// 2 13 10 [ 1, 0, -3, -1, -1, 1, 5, 4 ] Time: 8.570 }}}rHUÃWorksheet 'Quick Demo' (2007-08-17 at 07:47) {{{id=13| e = EllipticCurve([1,2,3,4,5]) print e.aplist(20) time n = e.aplist(10^6) /// [1, 0, -3, -1, -1, 1, 5, 4] Time: CPU 3.68 s, Wall: 5.30 s }}}rIUŒWorksheet 'Quick Demo' (2007-08-17 at 07:48) {{{id=7| a = random_matrix(ZZ,200) time f = a.charpoly() /// Time: CPU 4.48 s, Wall: 5.93 s }}}rJU—Worksheet 'Quick Demo' (2007-08-17 at 07:48) {{{id=7| a = random_matrix(ZZ,200, x=-9, y=9) time f = a.charpoly() /// Time: CPU 3.46 s, Wall: 4.58 s }}}rKUÇWorksheet 'Quick Demo' (2007-08-17 at 07:49) {{{id=14| %magma n := 200; a := MatrixAlgebra(IntegerRing(), n)![Random(-9,9) : i in [1..n^2]]; time f := CharacteristicPolynomial(a); /// Time: 1.740 }}}rLU™Worksheet 'Quick Demo' (2007-08-17 at 07:49) {{{id=7| a = random_matrix(ZZ,300, x=-9, y=9) time f = a.charpoly() /// Time: CPU 10.57 s, Wall: 13.73 s }}}rMUÇWorksheet 'Quick Demo' (2007-08-17 at 07:49) {{{id=14| %magma n := 300; a := MatrixAlgebra(IntegerRing(), n)![Random(-9,9) : i in [1..n^2]]; time f := CharacteristicPolynomial(a); /// Time: 6.760 }}}rNU£Worksheet 'Quick Demo' (2007-08-17 at 07:49) {{{id=7| # In SAGE a = random_matrix(ZZ,300, x=-9, y=9) time f = a.charpoly() /// Time: CPU 10.88 s, Wall: 14.80 s }}}rOUÇWorksheet 'Quick Demo' (2007-08-17 at 07:50) {{{id=14| %magma n := 300; a := MatrixAlgebra(IntegerRing(), n)![Random(-9,9) : i in [1..n^2]]; time f := CharacteristicPolynomial(a); /// Time: 7.320 }}}rPUCWorksheet 'Quick Demo' (2007-08-17 at 07:51) {{{id=20| #m.[tab] }}}rQUMWorksheet 'Quick Demo' (2007-08-17 at 07:51) {{{id=19| show(plot(a,0,pi)) }}}rRUÓWorksheet 'Quick Demo' (2007-08-17 at 07:51) {{{id=2| a = integrate(sin(x^2),x); a /// sqrt(pi)*((sqrt(2)*I + sqrt(2))*erf((sqrt(2)*I + sqrt(2))*x/2) + (sqrt(2)*I - sqrt(2))*erf((sqrt(2)*I - sqrt(2))*x/2))/8 }}}rSU«Worksheet 'Quick Demo' (2007-08-17 at 07:51) {{{id=19| show(plot(a,0,pi)) /// WARNING: When plotting, failed to evaluate function at 201 points. Last error message: '' }}}rTU½Worksheet 'Quick Demo' (2007-08-17 at 07:52) {{{id=19| show(plot(lambda x: abs(a(x)),0,pi)) /// WARNING: When plotting, failed to evaluate function at 201 points. Last error message: '' }}}rUUfWorksheet 'Quick Demo' (2007-08-17 at 07:52) {{{id=19| show(plot(lambda x: abs(a(x)).real(),0,pi)) }}}rVUŽWorksheet 'Quick Demo' (2007-08-17 at 07:53) {{{id=7| # In SAGE a = random_matrix(ZZ,300, x=-9, y=9) time f = a.charpoly() print len(f[0]) }}}rWU¼Worksheet 'Quick Demo' (2007-08-17 at 07:53) {{{id=7| # In SAGE a = random_matrix(ZZ,300, x=-9, y=9) time f = a.charpoly() print len(str(f[0])) /// Time: CPU 10.50 s, Wall: 13.84 s 521 }}}rXTfWorksheet 'Quick Demo' (2007-08-17 at 07:54) {{{id=7| # In SAGE a = random_matrix(ZZ,300, x=-9, y=9) time f = a.charpoly() print N(log(str(f[0]))) /// Time: CPU 10.76 s, Wall: 14.10 s Traceback (most recent call last): File "", line 1, in File "/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/code/58.py", line 7, in exec compile(ur'print N(log(str(f[Integer(0)])))' + '\n', '', 'single') File "/home/was/s/local/lib/python2.5/site-packages/zope.interface-3.3.0-py2.5-linux-i686.egg/", line 1, in File "/home/was/s/local/lib/python2.5/site-pa... }}}rYTWorksheet 'Quick Demo' (2007-08-17 at 07:54) {{{id=14| %magma n := 300; a := MatrixAlgebra(IntegerRing(), n)![Random(-9,9) : i in [1..n^2]]; time f := CharacteristicPolynomial(a); print Log(Coefficient(f,0)*1.0) /// Time: 7.060 1215.18267407038834444713323203 }}}rZUºWorksheet 'Quick Demo' (2007-08-17 at 07:54) {{{id=7| # In SAGE a = random_matrix(ZZ,300, x=-9, y=9) time f = a.charpoly() print N(log(f[0])) /// Time: CPU 10.66 s, Wall: 12.79 s NaN }}}r[U»Worksheet 'Quick Demo' (2007-08-17 at 07:55) {{{id=7| # In SAGE a = random_matrix(ZZ,300, x=-9, y=9) time f = a.charpoly() print log(f[0]*1.0) /// Time: CPU 10.57 s, Wall: 13.74 s NaN }}}r\TWorksheet 'Quick Demo' (2007-08-17 at 07:55) {{{id=24| f[0] /// -37593830494800648913243409398750485667240561164695466932680860259948608390189874098670105715211835060505310843528629875372231507811662344683464485690882283103679173548106698771152989084100908282338920120040135211462287296520076076724560920267726277330398726445700704177874189003472665540647826252839912833742003053053248734464557136015312396694778940681793482821613481401227265984580676641950729274115132958889276839010612254436660740468278283971671810063... }}}r]TÿWorksheet 'Quick Demo' (2007-08-17 at 07:55) {{{id=24| f[0].log() /// Traceback (most recent call last): File "", line 1, in File "/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/code/63.py", line 4, in exec compile(ur'f[Integer(0)].log()' + '\n', '', 'single') File "/home/was/s/local/lib/python2.5/site-packages/zope.interface-3.3.0-py2.5-linux-i686.egg/", line 1, in AttributeError: 'sage.rings.integer.Integer' object has no attribute 'log' }}}r^UOWorksheet 'Quick Demo' (2007-08-17 at 07:55) {{{id=24| N(log(f[0])) /// NaN }}}r_UQWorksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=24| RDF(log(f[0])) /// nan }}}r`USWorksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=24| N(log(f[0]),200) /// NaN }}}raUTWorksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=24| N(log(f[0]),2000) /// NaN }}}rbUCWorksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=24| a = f[0] }}}rcU>Worksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=25| a.l }}}rdUFWorksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=25| a.exact_log }}}reTèWorksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=25| a.exact_log() /// Traceback (most recent call last): File "", line 1, in File "/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/code/71.py", line 4, in exec compile(ur'a.exact_log()' + '\n', '', 'single') File "/home/was/s/local/lib/python2.5/site-packages/zope.interface-3.3.0-py2.5-linux-i686.egg/", line 1, in TypeError: function takes exactly 1 argument (0 given) }}}rfTèWorksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=25| a.exact_log() /// Traceback (most recent call last): File "", line 1, in File "/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/code/71.py", line 4, in exec compile(ur'a.exact_log()' + '\n', '', 'single') File "/home/was/s/local/lib/python2.5/site-packages/zope.interface-3.3.0-py2.5-linux-i686.egg/", line 1, in TypeError: function takes exactly 1 argument (0 given) }}}rgTWorksheet 'Quick Demo' (2007-08-17 at 07:56) {{{id=25| a.exact_log(10) /// Traceback (most recent call last): File "", line 1, in File "/home/was/talks/20070817-ccr/sage_notebook/worksheets/admin/0/code/73.py", line 4, in exec compile(ur'a.exact_log(Integer(10))' + '\n', '', 'single') File "/home/was/s/local/lib/python2.5/site-packages/zope.interface-3.3.0-py2.5-linux-i686.egg/", line 1, in File "integer.pyx", line 970, in integer.Integer.exact_log ValueError: self must be po... }}}rhTWorksheet 'Quick Demo' (2007-08-17 at 07:57) {{{id=14| %magma n := 300; a := MatrixAlgebra(IntegerRing(), n)![Random(-9,9) : i in [1..n^2]]; time f := CharacteristicPolynomial(a); print Log(AbsoluteValue(Coefficient(f,0))*1.0) /// Time: 7.640 1214.76576501968242382405874440 }}}riUÍWorksheet 'Quick Demo' (2007-08-17 at 07:57) {{{id=7| # In SAGE a = random_matrix(ZZ,300, x=-9, y=9) time f = a.charpoly() print log(abs(f[0])*1.0) /// Time: CPU 10.04 s, Wall: 13.03 s 1200.38548128654 }}}rjUªWorksheet 'Quick Demo' (2007-08-17 at 07:58) {{{id=15| # In SAGE n := 300 a = random_matrix(ZZ,300, 301, x=-9, y=9) time a.echelonize() /// Syntax Error: n := 300 }}}rkU«Worksheet 'Quick Demo' (2007-08-17 at 07:58) {{{id=15| # In SAGE n = 100 a = random_matrix(ZZ,n, n+1, x=-9, y=9) time a.echelonize() /// Time: CPU 1.13 s, Wall: 1.89 s }}}rlT€Worksheet 'Quick Demo' (2007-08-17 at 07:59) {{{id=26| %magma n := 100; a := MatrixAlgebra(RationalField(), n,n+1)![Random(-9,9) : i in [1..n^2]]; time e := EchelonForm(a); /// Traceback (most recent call last): time e := EchelonForm(a); File "/home/was/s/local/lib/python2.5/site-packages/sage/server/support.py", line 255, in syseval return system.eval(cmd) File "/home/was/s/local/lib/python2.5/site-packages/sage/interfaces/magma.py", line 264, in eval raise RuntimeError, "Error evaluation Magma code.\nIN:%s\nOUT:%s"%(x, ans) RuntimeError: Error evaluation Magma code. IN:n := 100; a := MatrixAlgebra(RationalFie... }}}rmTWorksheet 'Quick Demo' (2007-08-17 at 07:59) {{{id=26| %magma n := 100; a := RMatrixSpace(RationalField(), n,n+1)![Random(-9,9) : i in [1..n^2]]; time e := EchelonForm(a); /// Traceback (most recent call last): time e := EchelonForm(a); File "/home/was/s/local/lib/python2.5/site-packages/sage/server/support.py", line 255, in syseval return system.eval(cmd) File "/home/was/s/local/lib/python2.5/site-packages/sage/interfaces/magma.py", line 264, in eval raise RuntimeError, "Error evaluation Magma code.\nIN:%s\nOUT:%s"%(x, ans) RuntimeError: Error evaluation Magma code. IN:n := 100; a := RMatrixSpace(RationalFiel... }}}rnUÃWorksheet 'Quick Demo' (2007-08-17 at 07:59) {{{id=26| %magma n := 100; a := RMatrixSpace(RationalField(), n,n+1)![Random(-9,9) : i in [1..n*(n+1)]]; time e := EchelonForm(a); /// Time: 0.140 }}}roT¤Worksheet 'Quick Demo' (2007-08-17 at 07:59) {{{id=15| # In SAGE n = 100 a = random_matrix(QQ,n, n+1, x=-9, y=9) time a.echelonize() /// Traceback (most recent call last): time a.echelonize() File "/home/was/s/local/lib/python2.5/site-packages/sage/matrix/constructor.py", line 424, in random_matrix A.randomize(density=density, *args, **kwds) TypeError: 'y' is an invalid keyword argument for this function }}}rpULWorksheet 'Quick Demo' (2007-08-17 at 07:59) {{{id=28| QQ.random_element }}}rqULWorksheet 'Quick Demo' (2007-08-17 at 07:59) {{{id=28| QQ.random_element }}}rrU»Worksheet 'Quick Demo' (2007-08-17 at 08:00) {{{id=15| # In SAGE n = 100 a = random_matrix(QQ,n, n+1, num_bound=10, den_bound=1) time a.echelonize() /// Time: CPU 0.09 s, Wall: 0.10 s }}}rsU»Worksheet 'Quick Demo' (2007-08-17 at 08:00) {{{id=15| # In SAGE n = 200 a = random_matrix(QQ,n, n+1, num_bound=10, den_bound=1) time a.echelonize() /// Time: CPU 0.31 s, Wall: 0.32 s }}}rtUÃWorksheet 'Quick Demo' (2007-08-17 at 08:00) {{{id=26| %magma n := 200; a := RMatrixSpace(RationalField(), n,n+1)![Random(-9,9) : i in [1..n*(n+1)]]; time e := EchelonForm(a); /// Time: 3.330 }}}ruU½Worksheet 'Quick Demo' (2007-08-17 at 08:00) {{{id=15| # In SAGE n = 200 a = random_matrix(QQ,n, n+1, num_bound=2^64, den_bound=1) time a.echelonize() /// Time: CPU 1.84 s, Wall: 2.86 s }}}rvUÄWorksheet 'Quick Demo' (2007-08-17 at 08:00) {{{id=26| %magma n := 100; a := RMatrixSpace(RationalField(), n,n+1)![Random(1,2^64): i in [1..n*(n+1)]]; time e := EchelonForm(a); /// Time: 6.390 }}}rwU½Worksheet 'Quick Demo' (2007-08-17 at 08:00) {{{id=15| # In SAGE n = 100 a = random_matrix(QQ,n, n+1, num_bound=2^64, den_bound=1) time a.echelonize() /// Time: CPU 0.31 s, Wall: 0.41 s }}}rxU½Worksheet 'Quick Demo' (2007-08-17 at 08:01) {{{id=27| # In SAGE n = 200 a = random_matrix(QQ,n, n+1, num_bound=2^64, den_bound=1) time a.echelonize() /// Time: CPU 1.96 s, Wall: 3.22 s }}}ryUÆWorksheet 'Quick Demo' (2007-08-17 at 08:05) {{{id=29| %magma n := 200; a := RMatrixSpace(RationalField(), n,n+1)![Random(1,2^64): i in [1..n*(n+1)]]; time e := EchelonForm(a); /// Time: 159.920 }}}rzU^Worksheet 'Quick Demo' (2007-08-17 at 08:12) {{{id=30| 159.920 / 3.22 /// 49.6645962732919 }}}r{eubsUaddressr|U localhostr}U_Notebook__dirr~U*/home/was/talks/20070817-ccr/sage_notebookrub.