sage

Install

Visit: http://www.sagemath.org/

Usage

Notebook

sage: notebook()

乘法逆元

sage: 3.inverse_mod(5)
2

求质数

sage: next_prime(100)

N次方取模

sage: power_mod(2,100,3)
1

欧拉公式

sage: euler_phi(10)

factor

sage: factor(100)
2^2 * 5^2
sage: E = EllipticCurve(GF(101),[4,20]);
sage: Ep = plot(E);
sage: show(Ep);

解方程组

sage: a = var('a')
sage: S = solve(x^2 + x == a, x); S
[x == -1/2*sqrt(4*a + 1) - 1/2, x == 1/2*sqrt(4*a + 1) - 1/2]

函数图像

sage: show(plot(sin(x) + sin(1.6*x), (x,0,40), plot_points = 500))

sage: show(sum(circle((i,0), i, hue=sin(i/10)) for i in [100,99.5,..,0]), aspect_ratio=1,figsize=10)

sage: var('x y')
(x, y)
sage: plot3d(sin(x^2 + y^2)/(x^2 + y^2), (x,-3,3), (y,-3,3), plot_points=150, color='green')

y2=x3+4x+20

E = EllipticCurve([4,20]);
show(E);
show(plot(E));
show(plot(E.change_ring(GF(101))));



https://martinralbrecht.files.wordpress.com/2010/07/20120528-sage-mykonos.pdf
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.457.5385&rep=rep1&type=pdf



CloudBook.wiki - https://openwebsecurity.org