{{{id=1| ZZ /// Integer Ring }}} {{{id=2| QQ /// Rational Field }}} {{{id=3| RR /// Real Field with 53 bits of precision }}} {{{id=4| CC /// Complex Field with 53 bits of precision }}} {{{id=10| QQbar /// Algebraic Field }}} {{{id=36| a = ZZ(3) print a print type(a) /// 3 }}} {{{id=35| b = RR(5) print b type(b) /// 5.00000000000000 }}} {{{id=34| c = QQ(4/5) print c print type(c) /// 4/5 }}} {{{id=32| d = CC(4/5) print d print type(d) /// 0.800000000000000 }}} {{{id=39| RR(sqrt(2)) /// 1.41421356237310 }}} {{{id=38| a = QQbar(sqrt(2)) print a print type(a) /// 1.414213562373095? }}} {{{id=37| a.minpoly() /// x^2 - 2 }}} {{{id=5| Integers(24) /// Ring of integers modulo 24 }}} {{{id=6| GF(11) /// Finite Field of size 11 }}} {{{id=27| FiniteField(11) /// Finite Field of size 11 }}} {{{id=7| GF(16) /// Traceback (most recent call last): File "", line 1, in File "_sage_input_12.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("R0YoMTYp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in File "/tmp/tmpkjEdT8/___code___.py", line 3, in exec compile(u'GF(_sage_const_16 )' + '\n', '', 'single') File "", line 1, in File "factory.pyx", line 110, in sage.structure.factory.UniqueFactory.__call__ (sage/structure/factory.c:943) File "factory.pyx", line 138, in sage.structure.factory.UniqueFactory.get_object (sage/structure/factory.c:1146) File "/usr/local/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python2.6/site-packages/sage/rings/finite_rings/constructor.py", line 431, in create_object raise TypeError, "you must specify the generator name" TypeError: you must specify the generator name }}} {{{id=8| GF(16, 'a') /// Finite Field in a of size 2^4 }}} {{{id=9| PolynomialRing(QQ, 'y', 3) /// Multivariate Polynomial Ring in y0, y1, y2 over Rational Field }}} {{{id=11| PolynomialRing(GF(101), x) /// Univariate Polynomial Ring in x over Finite Field of size 101 }}} {{{id=13| ## /// }}} {{{id=14| T1. = PolynomialRing(QQ) /// }}} {{{id=15| f = x^2-1 /// }}} {{{id=28| f.factor() /// (x - 1) * (x + 1) }}} {{{id=16| f.factor() /// (x - 1) * (x + 1) }}} {{{id=17| T2. = PolynomialRing(RR) /// }}} {{{id=18| f = x^3-x-1 /// }}} {{{id=29| /// }}} {{{id=19| f.factor() /// (x - 1.32471795724475) * (x^2 + 1.32471795724475*x + 0.754877666246693) }}} {{{id=20| T3. = PolynomialRing(CC) /// }}} {{{id=21| f = x^3-x-1 /// }}} {{{id=22| f.factor() /// (x - 1.32471795724475) * (x + 0.662358978622373 - 0.562279512062301*I) * (x + 0.662358978622373 + 0.562279512062301*I) }}} {{{id=23| T4. = PolynomialRing(GF(128, 'a')) /// }}} {{{id=24| K. = GF(128, 'a') /// }}} {{{id=25| T4. = PolynomialRing(K) /// }}} {{{id=26| f = y^20-a /// }}} {{{id=30| f.factor() /// (y + a^4 + a^3 + 1)^4 * (y^4 + (a^4 + a^3 + 1)*y^3 + (a^6 + a^2 + a + 1)*y^2 + (a^4 + a^3 + a + 1)*y + a^6 + a^5 + a^4 + a^2 + 1)^4 }}} {{{id=31| /// }}}