For faster navigation, this Iframe is preloading the Wikiwand page for SageMath.

SageMath

SageMath
首次发布2005年2月24日,​19年前​(2005-02-24
当前版本
  • 10.4 (2024年7月20日;稳定版本)[1]
编辑维基数据链接
原始码库 编辑维基数据链接
编程语言PythonCython
操作系统跨平台
平台Python
文件大小1.1 GBMS Windows
类型电脑代数系统
许可协议GNU通用公共许可证
网站www.sagemath.org

SageMath(曾叫做SageSAGE,为“System for Algebra and Geometry Experimentation”的首字母缩写[2]),是一个覆盖许多数学功能的应用软件,包括代数组合数学图论计算数学数论微积分统计

SAGE的第一个版本在GNU许可证下发布于2005年2月24日,最初的目标是创造一个“MagmaMapleMathematicaMATLAB的开源替代品”。Sage的主导开发人员威廉·斯坦因是华盛顿大学数学家

功能

[编辑]
Sage文档在Firefox(Mozilla),Opera,Konqueror和Safari的界面。
使用Sage Notebook接口的方程求解和排版。

Sage的功能包括[3]

  • 一个用于回顾及重新使用以前的输入和输出及加入图形和文本注释的记事本文档接口,可在通用的网页浏览器如FirefoxOperaKonquerorSafari中使用。在安全和保密要求高的情况下可通过HTTPS与记事本连接,Sage可同时在本地和远程使用。
  • 一个使用IPython的基于文本的命令行界面
  • Python编程语言,支持函数化编程面向对象的结构。
  • 支持多核处理器,多处理器,及在并行计算
  • 使用MaximaSymPy进行微积分计算。
  • 使用GSLSciPyNumPy做线性代数数值计算。
  • 基础特殊数学函数库
  • 函数和数据的二维和三维图形显示
  • 矩阵和数据处理工具,支持稀疏数组
  • 使用RSciPy的多元统计分析
  • 一个在计算和应用上添加用户界面的工具箱的
  • 使用Pylab以及Python编程语言的图像处理工具
  • 图论可视化和分析工具
  • 数论的函数库
  • 数据,图像,视频,声音,电脑辅助设计,地理资讯系统,文档和生物医学格式的输入输出过滤器
  • 适当支持在函数中进行复数, 任意精度及符号计算
  • 包括公式编辑的文字处理技术,并可在Sage内嵌入LaTeX文档
  • Twisted提供的连接到SQLJava.NETC++FORTRAN语言的网络工具,支持包括HTTPNNTPIMAPSSHIRCFTP等在内的大量协议
  • MathematicaMaximaMaple等一些第三方软件的接口 ,允许用户组合软件及比较输出和性能。因此,它也是一个类似于GNU TeXmacs的其他数学工具的“前端”
  • 使用MoinMoin作为知识管理的维基系统
  • 使用Sphinx的文档管理
  • 一个自动化测试包,允许电脑终端用户进行测试

虽然不是Sage直接提供的功能,但Sage可以从Mathematica内部调用。Mathematica的一个记事本可用于此。

设计理念

[编辑]

威廉.斯坦在设计Sage时意识到了有不同的语言(包括有CC++FortranPython)编写的大量现成的大型开源数学软件可用。

因此,Sage(用PythonCython实现的)将所有专用的数学软件集成到一个通用的接口而不是从头开发。用户只需要了解Python

Sage由学生和专业人士开发。Sage的开发由志愿工作和赠款支持。 [4]

性能

[编辑]

二进制包和原始码都可以从Sage页面下载。如果从原始码构建,许多包含的库如AtlasFLINT和NTL和都会针对该电脑考虑到处理器数量,缓存大小的,是否有硬件支持SSE指令等进行调整和优化。

许可和可用性

[编辑]

Sage在GNU通用公共许可证2+下自由软件条款下发布 。Sage可通过多种方式获得:

Sage包含的软件包

[编辑]

如上所述,SAGE的理念是利用现有的任何开放原始码库。因此,借用了许多项目。

Sage中包含的数学软件包
代数 GAP英语GAP (computer algebra system)Maxima ,Singular
代数几何 Singular
任意精度计算 MPIR,MPFR,MPFI,NTL
算术几何 PARI/GP, NTL,mwrank,ecm
微积分 MaximaSymPyGiNaC
组合数学 Symmetrica,Sage-Combinat
线性代数 ATLAS,BLASLAPACKNumPy,LinBox,IML,GSL
图论 NetworkX
群论 GAP英语GAP (computer algebra system)
数值计算 GSLSciPyNumPy,ATLAS
数论 PARI/GP,FLINT,NTL
统计计算 R, SciPy
Sage中包含的其它包
命令行 IPython
数据库 ZODB, Python Pickles,SQLite
图形界面 Sage Notebook, jsmath
图像 Matplotlib,Tachyon3d,GD, Jmol
交互式编程语言 Python
网络 Twisted

语言示例

[编辑]

微积分

[编辑]
x,a,b,c = var('x,a,b,c')
log(sqrt(a)).simplify_log() # returns log(a)/2
sin(a+b).simplify_trig() # returns cos(a)*sin(b) + sin(a)*cos(b)
cos(a+b).simplify_trig() # returns cos(a)*cos(b) - sin(a)*sin(b)

limit((xˆ2+1)/(2+x+3*xˆ2), x=infinity) # returns 1/3
limit(sin(x)/x, x=0) # returns 1

diff(acos(x),x) # returns -1/sqrt(1 - xˆ2)
f = exp(x)*log(x)
f.diff(x,3) # returns e^x*log(x) + 3*e^x/x - 3*e^x/x^2 + 2*e^x/x^3

solve(a*x^2 + b*x + c, x) # returns [x == (-sqrt(b^2 - 4*a*c) - b)/(2*a),
 # x == (sqrt(b^2 - 4*a*c) - b)/(2*a)]

微分方程

[编辑]
t = var('t') # define a variable t
x = function('x',t) # define x to be a function of that variable
DE = lambda y: diff(y,t) + y - 1
desolve(DE(x(t)), [x,t]) # returns '%e^-t*(%e^t+%c)'

线性代数

[编辑]
A = Matrix([[1,2,3],[3,2,1],[1,1,1]])
y = vector([0,-4,-1])
A.solve_right(y) # returns (-2, 1, 0)
A.eigenvalues() # returns [5, 0, -1]

B = Matrix([[1,2,3],[3,2,1],[1,2,1]])
B.inverse() # returns [ 0 1/2 -1/2]
 # [-1/4 -1/4 1]
 # [ 1/2 0 -1/2]

# Call numpy for the Moore-Penrose pseudo-inverse,
# since Sage does not support that yet.

import numpy
C = Matrix([[1 , 1], [2 , 2]])
matrix(numpy.linalg.pinv(C.numpy())) # returns [0.1 0.2]
 # [0.1 0.2]

数论

[编辑]
prime_pi(1000000) # returns 78498, the number of primes less than one million

E = EllipticCurve('389a') # construct an elliptic curve from its Cremona label
P, Q = E.gens()
7*P + Q # returns (2869/676 : -171989/17576 : 1)

历史

[编辑]

只列出了主要发布版本。Sage采用的“早发布,常发布”的理念,每两至三个星期发布一次。[5]

Sage版本
版本 发布日期 说明
0.1 2005年1月 包括 Pari,但不包含GAP和 Singular
0.2 - 0.4 2005年5-7月 Cremona的数据库,多元多项式,大型有限域和更多的文档
0.5 - 0.7 2005年8-9月 向量空间,环,模块化符号和Windows使用
0.8 2005年10月 完整发布的GAP,和Singular
0.9 2005年11月 添加了Maxima和clisp
1.0 2006年2月
2.0 2007年1月
3.0 2008年4月
4.0 2009年5月
5.0 2012年5月 5.0里程碑页面存档备份,存于互联网档案馆
6.0 2013年12月

2007年,Sage赢得自由软件的国际竞争中科学软件部分的Les Trophées du Libre首奖。 [6]

参见

[编辑]

参考文献

[编辑]
  1. ^ 1.0 1.1 Release 10.4. 2024年7月20日 [2024年7月27日]. 
  2. ^ Stein, William. SAGE: A Computer System for Algebra and Geometry Experimentation. [30 March 2012]. (原始内容存档于2012-02-10). 
  3. ^ Sage文档. [2010-11-26]. (原始内容存档于2010-11-29). 
  4. ^ Sage - Acknowledgement. [2010-07-13]. (原始内容存档于2010-06-12). 
  5. ^ 存档副本. [2014-05-25]. (原始内容存档于2014-05-27). 
  6. ^ Free Software Brings Affordability, Transparency To Mathematics. Science Daily. December 7, 2007 [2008-07-20]. (原始内容存档于2012-04-19). 

外部链接

[编辑]
{{bottomLinkPreText}} {{bottomLinkText}}
SageMath
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?