CoCalc -- Collaborative Calculation in the Cloud
Sharedsupport / 2017-01-18-185633-timing.sagewsOpen in CoCalc

Examples for support purposes...

%time 2 + 3
5 CPU time: 0.00 s, Wall time: 0.00 s
%timeit 2 + 3
625 loops, best of 3: 189 ns per loop
%time
for i in range(10):
    print i, factor(2^(i+100)-1)
0 3 * 5^3 * 11 * 31 * 41 * 101 * 251 * 601 * 1801 * 4051 * 8101 * 268501 1 7432339208719 * 341117531003194129 2 3^2 * 7 * 103 * 307 * 2143 * 2857 * 6529 * 11119 * 43691 * 131071 3 2550183799 * 3976656429941438590393 4 3 * 5 * 17 * 53 * 157 * 1613 * 2731 * 8191 * 858001 * 308761441 5 7^2 * 31 * 71 * 127 * 151 * 337 * 29191 * 106681 * 122921 * 152041 6 3 * 107 * 6361 * 69431 * 20394401 * 28059810762433 7 162259276829213363391578010288127 8 3^4 * 5 * 7 * 13 * 19 * 37 * 73 * 109 * 87211 * 246241 * 262657 * 279073 9 745988807 * 870035986098720987332873 CPU time: 0.07 s, Wall time: 0.14 s
%timeit
for i in range(10):
    print i, factor(2^(i+100)-1)
5 loops, best of 3: 92.9 ms per loop
%var x, y
contour_plot(y^2 + 1 - x^3 - x, (y,-pi,pi), (x,-pi,pi))