-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
tour-research.html
404 lines (331 loc) · 13.8 KB
/
tour-research.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SageMath - Tour - Research
</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="search"
type="application/opensearchdescription+xml"
href="https://www.sagemath.org/res/sage-search.xml"
title="Search sagemath.org" />
<link href='res/sage.css' type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="pix/sageicon.png" type="image/x-icon" />
<link rel="mask-icon" href="pix/icon_only/sagemath_pinned_tab_icon.svg" color="blue" />
<script src="//code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src='res/sage.js' type="text/javascript"></script>
<link href='//fonts.googleapis.com/css?family=RobotoDraft:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en,fr,de,es' rel='stylesheet' type='text/css'>
<link href="https://mathstodon.xyz/@sagemath" rel="me" />
<meta property="og:title" content="SageMath Mathematical Software System - Sage"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://www.sagemath.org/"/>
<meta property="og:image" content="https://sagemath.org/pix/logo_sagemath+icon_oldstyle.png"/>
<meta property="og:site_name" content="SageMath Mathematical Software System"/>
<meta property="og:description" content="SageMath is a free and open-source mathematical software system."/></head>
<body>
<div id="header" class="small">
<div id="header-logo">
<a href="index.html">
<img width="250" height="65" alt="SageMath Logo" class="round raised"
src="pix/logo_sagemath+icon_oldstyle.png" title="SageMath Mathematical Software" />
</a></div>
<div id="header-text"><form action="search.html" method="get">
<a href="https://github.com/sagemath/sage">GitHub</a>
·
<a href="https://wiki.sagemath.org/">Wiki</a>
·
<a href="https://ask.sagemath.org/">Questions?</a>
·
<a href="https://github.com/sponsors/sagemath" style="font-weight: bold;">
<span style="color:#ea4aaa">♥</span> Sponsor
</a>
·
<a href="https://opencollective.com/sage_math" style="font-weight: bold;">Donate</a>
</form>
Online:
<a href="https://cocalc.com/?utm_source=sagemath.org&utm_medium=top">CoCalc</a>
·
<a href="https://sagecell.sagemath.org/">SageCell</a>
or
<a href="https://doc.sagemath.org/html/en/installation/index.html">Install</a>,
<a href="https://github.com/sagemath/sage">Clone</a>
<br/>
<a href="https://www.facebook.com/pages/Sage-Math/26593144945">
<img alt="F" src="pix/facebook-favicon.ico" width="16" height="16" /></a>
<a href="https://twitter.com/sagemath">
<img alt="T" src="pix/twitter-favicon.ico" width="16" height="16"/></a>
<a href="https://mathstodon.xyz/@sagemath">
<img alt="T" src="pix/mastodon-favicon.ico" width="16" height="16"/></a></div>
</div>
<div id="sage-nav-buffer" style="display: none"></div>
<ul id="sage-nav"><li><a href="index.html">Home</a>
<ul>
<li><a href="search.html">Search</a></li>
<li><a href="development-ack.html">Acknowledgments</a></li>
<li><a href="https://wiki.sagemath.org/Workshops">SageMath Days</a></li>
</ul>
</li>
<li><a href="tour.html">Tour</a>
<ul>
<li><a href="tour.html">Overview</a></li>
<li><a href="library-why.html">Why Sage?</a></li>
<li class="section"><a href="tour-quickstart.html">Quickstart</a></li>
<li><a href="tour-graphics.html">Graphics</a></li>
<li><a href="tour-research.html">Research</a></li>
<li class="section"><a href="https://wiki.sagemath.org/interact/">Interactive Plots (wiki)</a></li>
<li><a href="https://doc.sagemath.org/html/en/a_tour_of_sage/">A Tour of SageMath</a></li>
</ul>
</li>
<li><a href="help.html">Help</a>
<ul>
<li><a href="https://doc.sagemath.org"><b>Online Documentation</b></a></li>
<li class="section"><a href="help.html">Support Resources</a></li>
<li><a href="help-groups.html">Mailing Lists</a></li>
<li><a href="https://ask.sagemath.org" class="ext">Ask a question</a></li>
<li><a href="https://sagemath.zulipchat.com/" class="ext">Chat on Zulip</a></li>
<li><a href="help-video.html">Videos</a></li>
<li class="section"><a href="https://doc.sagemath.org/html/en/tutorial/">Tutorial</a></li>
<li><a href="https://doc.sagemath.org/html/en/constructions/">Constructions</a></li>
<li><a href="https://doc.sagemath.org/html/en/reference/">Reference Manual</a></li>
</ul>
</li>
<li><a href="library.html">Library</a>
<ul>
<li><a href="library.html">Overview</a></li>
<li><a href="library-stories.html">Testimonials</a></li>
<li><a href="library-publications.html">Publications</a></li>
<li><a href="library-publications-combinat.html">Publications Combinat</a></li>
<li><a href="library-publications.html#books" >Books</a></li>
<li class="section"><a href="library-marketing.html">Marketing</a></li>
<li><a href="library-press.html">Press Kit</a></li>
<li class="section"><a href="calctut/index.html">Calculus Tutorial</a></li>
</ul>
</li>
<li><a href="https://doc.sagemath.org/html/en/installation/index.html">Download</a>
<ul>
<li><a href="https://doc.sagemath.org/html/en/installation/index.html">Install guide: What/how to download</a>
<li class="section"><a href="https://github.com/sagemath/sage">Clone from GitHub</a></li>
<li class="section"><a href="https://github.com/3-manifolds/Sage_macOS/releases" class="ext">macOS binaries (3-manifolds)</a></li>
<li><a href="https://doc.sagemath.org/html/en/installation/conda.html#sec-installation-conda">Linux/macOS binaries (conda-forge)</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/wsl/install">Windows: Use Windows Subsystem for Linux</a></li>
</ul>
</li>
<li><a href="development.html">Development</a>
<ul>
<li><a href="https://github.com/sagemath/sage/blob/develop/CONTRIBUTING.md" class="ext">Contributing to SageMath</a></li>
<li><a href="https://github.com/sagemath/sage" class="ext">GitHub repository</a></li>
<li><a href="development-groups.html">Mailing Lists</a></li>
<li><a href="development-map.html">Developer Map</a></li>
<li><a href="development-prize.html">Prize</a></li>
<li><a href="development-ack.html">Acknowledgment</a></li>
<li><a href="https://doc.sagemath.org/html/en/developer/" class="ext">Developer Guide</a></li>
</ul>
</li>
<li><a href="links.html">Links</a>
<ul>
<li><a href="https://github.com/sagemath/sage/wiki/Mathematical-Software-Landscape" class="ext">Math Software Landscape</a></li>
<li><a href="https://doc.sagemath.org/html/en/reference/spkg/" class="ext">SageMath Components</a></li>
<li class="section"><a href="https://sagecell.sagemath.org/" class="ext">SageMath Cell Server</a></li>
<li><a href="https://wiki.sagemath.org/">SageMath Wiki</a></li>
<li><a href="https://groups.google.com/forum/#!forum/sage-devel">Report a bug</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</li></ul>
<h1>SageMath in Research</h1>
<div class="narrow txt"></div>
<h3>Numbers</h3>
<table class="top">
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<tbody>
<tr>
<td class="leftpadding">
<pre class="code">
sage: <strong>a = RR(sqrt(2)); a</strong>
1.41421356237310
sage: <strong>b = sqrt(RealField(100)(2)); b</strong>
1.4142135623730950488016887242
sage: <strong>(a-b).parent()</strong>
Real Field with 53 bits of precision
sage: <strong>b.parent()</strong>
Real Field with 100 bits of precision
sage: <strong>c = RealField(100)(a); c</strong>
1.4142135623730951454746218587
sage: <strong>b-c</strong>
-9.6672933134529652200516048587e-17
</pre>
</td>
<td class="rightpadding">
<div class=" txt">
There are different types of numbers available. There are three major groups for floating
point arithmetic:
<ul>
<li>Python: float, complex, decimal</li>
<li>SageMath specific: RDF, CDF, RQDF, CC, RR, RIF, CIF</li>
<li>included Systems: pari, maxima</li>
</ul>
<div class=" txt">
Most important are the SageMath specific types. They use specific libraries and have more
functionality. Important are RR and CC, because their behavior is independent of the
underlying system and architecture using the <a href="http://www.mpfr.org/"
>MPFR</a> library. RDF and CDF use the GSL library and are very fast and
compatible with the SageMath framework.
</div>
<div class=" txt">
The example on the left shows how to construct different types of floating point numbers and
interactions between them.
</div>
</div>
</td>
</tr>
<tr>
<th colspan="2">
<h3>Algebra</h3>
</th>
</tr>
<tr>
<td class="leftpadding">
<pre class="code">
sage: <strong>M = IntegerModRing(7)</strong>
sage: M(2) + M(8)
3
sage: <strong>M.list()</strong>
[0, 1, 2, 3, 4, 5, 6]
sage: <strong>A.<a,b,c> = AbelianGroup([2,2,3]); A</strong>
Multiplicative Abelian Group isomorphic to C2 x C2 x C3
sage: <strong>A.order()</strong>
12
sage: <strong>A.list()</strong>
[1, c, c^2, b, b*c, b*c^2, a, a*c, a*c^2,
a*b, a*b*c, a*b*c^2]
sage: <strong>c^5*b*a^4*c</strong>
b
</pre>
</td>
<td class="rightpadding">
<div class="txt">
SageMath is built on an object oriented programming language. It uses this feature to describe
categories of mathematical objects. A good example are algebraic objects like groups, rings
and fields.
</div>
<div class="txt">
On the left side you can see some examples on how to construct and use them. The first one picks
two integers out of the ring of integers modulo 7. The <span class="code">list()</span>
method lists all elements of that ring. Similarly, the second example constructs an abelian
group and assigns its generators to the letters a, b and c.
</div>
</td>
</tr>
<tr>
<th colspan="2">
<h3>Combinatorics</h3>
</th>
</tr>
<tr>
<td class="leftpadding">
<pre class="code">
sage: <strong>X = species.SingletonSpecies()</strong>
sage: <strong>Y = species.BinaryTreeSpecies()</strong>
sage: <strong>L = CombinatorialSpecies()</strong>
sage: <strong>L.define(X+X*Y*Y+Y*L)</strong>
sage: <strong>L.generating_series().coefficients(10)</strong>
[0, 1, 1, 3, 8, 23, 70, 222, 726, 2431]
sage: <strong>L.structures([1,2,3]).cardinality()</strong>
18
</pre>
</td>
<td class="rightpadding">
<div class="txt">
The demonstration on the left hand side shows how SageMath is able to work with combinatorial
objects from the theory of <a href="https://en.wikipedia.org/wiki/Combinatorial_species"
>Combinatorial Species</a>.
</div>
</td>
</tr>
<tr>
<th colspan="2">
<h3>Embedding SageMath into LaTeX</h3>
</th>
</tr>
<tr>
<td class="leftpadding">
<pre class="code">
\section{SageTex Examples}
This is a small calculation:
The sum of $1+2+\sqrt{3} = \sage{1+2+sqrt(3)}$.
Here you can see a $sin()$-Function:
\sageplot{plot(sin(x), x, 0, 2*pi)}
</pre>
</td>
<td class="rightpadding">
<div class="txt">
<a name="latex"
id="latex"></a> It is possible to call SageMath commands from inside a LaTeX document. The
SageTex package provides special LaTeX commands that translate SageMath code into a Python
file. Then this file is evaluated by SageMath and the results of each calculation are
written back into the LaTeX file. This even works for graphics, source-code and saved
objects.
</div>
<div class="txt">
The example on the left shows how you can embed a formula like $$1+2+\sqrt{3}$$ and a plot
in a LaTeX document.
</div>
<div>
This package is part of the SageMath distribution in the <span class=
"code">/examples/latex_embed</span> sub-directory together with the documentation. You can
also obtain it online: <a
href="http://www.ctan.org/pkg/sagetex">CTAN: SageTex
Package</a>
</div>
</td>
</tr>
</tbody>
</table>
<div class="txt"></div>
<div class="narrow center txt">
<a href="./tour-quickstart.html">Tour Quickstart</a> · <a href="./tour-graphics.html">Tour Graphics</a>
</div>
<div style="height:auto;min-height:50px;"> </div>
<div id="footer" class="center">
<table>
<tr id="links">
<td><a id="footer-webmaster" href="https://github.com/sagemath/website"></a></td>
<td>·</td>
<td><a id="footer-cc" title="website content is Creative Commons 3.0 licensed"
href="https://creativecommons.org/licenses/by-sa/4.0/"></a></td>
<td>·</td>
<td><a id="footer-contact" title="Contact SageMath Project" href="contact.html"></a></td>
</tr>
<tr style="height: 70px;">
<td align="right" colspan="1">
<a style="background:none;" href="https://www.clustrmaps.com/map/Sagemath.org">
<img width="65" height="42"
style="border:0px;"
id="clustrMapsImg"
src="https://www.clustrmaps.com/stats/maps-no_clusters/sagemath.org-thumb.jpg" alt="Locations of visitors to this page" />
</a>
</td>
<td></td>
<td align="center" style="padding-bottom: 10px;vertical-align: center">
<div id="histats_counter"></div>
<noscript>
<a href="https://www.histats.com" alt="free web stats" target="_blank" >
<div id="histatsC"><img border="0" src="https://s4is.histats.com/stats/i/1579950.gif?1579950&103"></div></a>
</noscript>
</td>
<td></td>
<td>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://sagemath.org" data-text="I like @sagemath" data-related="sagemath">Tweet</a>
</td>
</tr>
<tr>
<td colspan="7" style="text-align: center;">
<iframe src="https://github.com/sponsors/sagemath/button" title="Sponsor sagemath" height="35" width="116" style="border: 0; vertical-align: middle;"></iframe>
</td>
</tr>
</table>
</div></body>
</html>