SageMath
2005 | |
10.3 - 2023 | |
10.2rc4 - 2023 | |
リポジトリ | |
プログラミング | Python, Cython |
Linux, macOS, Microsoft Windows, Solaris, Android, iOS | |
プラットフォーム |
|
| |
ライセンス | GPLv3 |
www |
SageMath(セイジ、
SageMathは2005
SageMathはPythonプログラミング
特徴
[SageMath のマニュアルに
- インタフェース
- ノートブック
形式 で対話 的 に作業 を行 うインタフェースを持 つ。そのためそれまでの入力 を確認 したり再 利用 したりすることが簡便 である。文字 入出力 と画像 の両方 が扱 え、多 くのウェブブラウザ(Firefox、Opera、Konqueror、Safariなど)から利用 できる。状況 に応 じてHTTPS接続 を行 うこともでき、Sageのノートブックはネットワーク越 しでも、ローカルでも扱 うことができる。 - IPythonによるコマンドライン・インターフェイス
- Pythonの
導入 による、手続 き型 、関数 型 、オブジェクト指向 を両立 するプログラミング - Maximaと SymPy を
使 った計算 のサポート - スライダーなどの
直観 的 な操作 を備 えたGUI[5] - ユーザインタフェースを
追加 するためのツールキット - データ、
画像 、動画 、音声 、CAD 、GIS (地理 情報 システム)、ワープロ文書 、医用 データ形式 の入出力 数式 の表示 と LaTeX文書 の埋 め込 み[6]- Twisted によるネットワーク
経由 のSQL、Java、.NET Framework、C++、FORTRANの利用 ツール (これによりHTTP、NNTP、IMAP、SSH、IRC、FTP が利用 可能 となっている) 外部 ソフトウェア(Mathematica、Magma、Mapleなど)をSageMathから呼 び出 し、処理 結果 や実行 速度 を比較 する機能 (GNU TeXmacsのような、外部 ソフトウェアへのフロントエンドとしてSageMathを利用 できる)情報 集約 のためのWikiシステムとして MoinMoinを備 える- ユーザーから
利用 できる、テストの自動 実行 環境 - FORTRAN、C、C++とCythonのコードの
実行
演算
- SMPなどのマルチコアCPU
環境 での並列 実行 、および分散 コンピューティング環境 での並列 計算 のサポート - GNU Scientific Library、SciPy、NumPyによる
線形 代数 の数値 計算 初等 関数 および特殊 関数 のライブラリ行列 およびベクトル演算 (疎行列 にも対応 )- RとSciPyによる
多 変量 解析 のサポート - Python
同様 のpylabによる画像 解析 ツール 数 論 の関数 のライブラリ複素数 、多倍 長 計算 、記号 計算 のサポート
- グラフ
描画
- データおよび
関数 の2Dおよび3Dプロット - グラフ(ノードとリンクからなる)の
可視 化 と解析
この
開発 方針
[ウィリアム・スタインは
現実 的 に意味 のある、Magma、Maple、Mathematica、MATLABの対抗 となるソフトウェアを作 り上 げること。これを最初 からやろうとすると、膨大 な労力 を要 するであろうと考 えられた。当時 すでに、多数 の実用 に耐 える数学 関連 ソフトウェアがオープンソースで提供 されていたが、それぞれ異 なるプログラミング言語 (C、C++、FORTRAN、Pythonなどが多 かった)で実装 されていた。
そこで、
これを
SageMathの
成果
[- 2007
年 : SageMathは国際 的 なフリーソフトウェアのコンクールであるトルフェ・ド・リブレの科学 技術 ソフトウェア部門 で一等 賞 を受賞 している[10]。 - 2012
年 : Google Summer of Codeのプロジェクトのひとつに選 ばれた。[11] - 2013
年 : ACM/SIGSAM Jenks賞 を受賞 。[12] - SageMath は
多 くの数学 の論文 や本 で引用 されている。[13][14]
性能
[SageMathのソースコード、バイナリともに
利用 条件
[SageMathはGNU General Public License version 2+にしたがった
- ソースコードはダウンロード・ページからダウンロードできる。
開発 者 用 として、開発 途中 のバージョンもダウンロードできる。 - Linux、macOS、Solaris(x86およびSPARCの
両方 )についてはバイナリが用意 されている。Solaris版 は試験 的 な提供 である。 - LinuxのブータブルCDとしても
配布 されている。これを使 えば、SageMathのインストール作業 を行 わずに使 うことができる。 - Sageのオンライン
版 もhttp://demo.sagenb.orgで提供 されている。しかし技術 的 な理由 からユーザーが利用 できるメモリサイズに、またセキュリティ面 に制限 がある。
Sage 8.0
SageMathに含 まれるソフトウェア・パッケージ
[GAP, Maxima, SINGULAR | |
SINGULAR | |
MPIR, MPFR, MPFI, NTL, mpmath | |
PARI/GP, NTL, mwrank, ecm | |
Maxima, SymPy, GiNaC | |
Symmetrica, Sage-Combinat | |
ATLAS, BLAS, LAPACK, NumPy, LinBox, IML, GSL | |
グラフ |
NetworkX |
GAP | |
GSL, SciPy, NumPy, ATLAS | |
PARI/GP, FLINT, NTL | |
R, SciPy |
コマンドライン・インターフェイス | IPython |
データベース | ZODB, Python Pickles, SQLite |
GUI | Sage Notebook, jsmath |
グラフィクス | Matplotlib, Tachyon3d, GD Graphics Library, Jmol |
Python | |
ネットワーク | Twisted |
利用 例
[数式 処理
[x,a,b,c = var('x,a,b,c')
log(sqrt(a)) # returns log(a)/2
log(a/b).simplify_log() # returns log(a) - log(b)
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)
(a+b)ˆ5 # returns (b + a)ˆ5
expand((a+b)ˆ5) # returns bˆ5 + 5*a*bˆ4 + 10*aˆ2*bˆ3 +
# 10*aˆ3*bˆ2 + 5*aˆ4*b + aˆ5
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)]
f = xˆ2 + 432/x
solve(f.diff(x)==0,x) # returns [x == 3*sqrt(3)*I - 3,
# x == -3*sqrt(3)*I - 3, x == 6]
微分 方程式
[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)
開発 の経緯
[メジャーバーションについてのみ
Version | Release Date | Description |
---|---|---|
0.1 | 2005 |
PARI/GP に |
0.2 - 0.4 | 2005 |
Cremona データベース、 |
0.5 - 0.7 | 2005 |
ベクトル、 |
0.8 | 2005 |
GAP のフルサポート、Singular サポート |
0.9 | 2005 |
Maxima、clisp |
1.0 | 2006 |
|
2.0 | 2007 |
|
3.0 | 2008 |
Interacts, Rインターフェース |
4.0 | 2009 |
Solaris 10サポート, 64bit OSXサポート |
5.0 | 2012 |
OSX Lionサポート |
6.0 | 2013 |
Sageの |
7.0 | 2016 |
|
8.0 | 2017 |
脚注
[- ^ “Releases”. GitHub. 2024
年 3月 19日 閲覧 。 - ^ “Tags”. GitHub. 2023
年 11月21日 閲覧 。 - ^ Stein, William (2007
年 6月 12日 ). “SAGE Days 4”. 2007年 8月 2日 閲覧 。(英語 ) - ^ Sage documentation(
英語 ) - ^ “Sage Interact functionality”. 2008
年 4月 11日 閲覧 。(英語 ) - ^ The TeX Catalogue OnLine, Entry for sagetex, Ctan Edition (
英語 ) - ^ http://facstaff.unca.edu/mcmcclur/Mathematica/Sage/ Calling Sage from Mathematica(
英語 ) - ^ http://facstaff.unca.edu/mcmcclur/Mathematica/Sage/UsingSage.nb A Mathematica notebook to call Sage from Mathematica.(
英語 ) - ^ “Explicit Approaches to Modular Forms and Modular Abelian Varieties”. National Science Foundation (2006
年 4月 14日 ). 2007年 7月 24日 閲覧 。(英語 ) - ^ “Free Software Brings Affordability, Transparency To Mathematics”. Science Daily (December 7 2007). 2008
年 7月 20日 閲覧 。(英語 ) - ^ “Sage Mathematical Software System”. 9 June 2012
閲覧 。 - ^ “SIGSAM: Awards and prizes”. 2 Aug 2013
閲覧 。 - ^ “Publications Citing Sage”. 14 July 2011
閲覧 。 - ^ “Publications Citing Sage-Combinat”. 14 July 2011
閲覧 。
参考 文献
[- Zimmermann, P., Casamayou, A., Cohen, N., Connan, G., Dumont, T., Fousse, L., ... & Bray, E. (2018). Computational Mathematics with SageMath. SIAM.
- Kim, D. S., Lee, S. G., & Markowsky, G. (2010). Mobile Sage-Math for Linear Algebra and its Application. Electronic Journal of Mathematics & Technology, 4(3).
- Ko, R. Y., Kim, D. S., Bak, J. Y., & Lee, S. G. (2009). Development of Mobile Sage-math and its use in Linear Algebra. Communications of Mathematical Education, 23(4), 1023-1041.
- Heuberger, C., Krenn, D., & Kropf, S. (2014). Automata in SageMath---Combinatorics meet Theoretical Computer Science. arXiv preprint arXiv:1404.7458.
関連 項目
[外部 リンク
[公式 ウェブサイト電子 本 (PDF, CCライセンス): P. Zimmermann, et al.: "Computational Mathematics with SageMath" (Dec, 2018). (リンク切 れの可能 性 )- Official Sage Documentation Manual, Reference, Tutorials, ...
- Sage introduction videos
- Use Sage online in your web-browser
- Free software brings affordability, transparency to mathematics
- AMS Notices Opinion - Open Source Mathematical Software
数学 ソフトウェアとフリードキュメントXIV(2012年 3月 25日 ) -数式 処理 システム Sage入門 -横山 俊一 (リンク切 れ)竹本 浩 のページ - Sageの紹介 。公開 Sageサーバ。- ( Book Review)John B. Little :"Computational Mathematics with SageMath", Bull.AMS, v.57, no.3, (Jul,2020), pp.515–521, url="https://doi.org/10.1090/bull/1690"
- Sageチュートリアルへようこそ
佐々木 格 :「PythonとSageMath」(2022年 )- Paul Zimmermann, et al.: "Computational Mathmatics with SageMath",(2018), (open textbook in PDF).
- Gregory V. Bard: "Sage for Undergraduates", AMS (2015). (PDF
入手 可能 ) - Gregory V. Bard: "Sage for Undergraduates: Compatible With Python 3",2nd Ed., AMS, ISBN 978-1470461553 (2022
年 10月 30日 ).