The class is for algebraic number represented by characteristic polynomial and approximation value.
polynomial must be a monic irreducible polynomial defining the number field. coefficient must be a rational number list or an integer list . approx must be one of roots of polynomial.
Ex.1
>>> a = algfield.ApproxAlgNumber([1, 2], 1.4142, [-2, 0, 1]) >>> print a ApproxAlgNumber(3.8284, [-7, -2, 1])
integer coefficient of the algebraic number.
defining polynomial of the number field.
degree of the polynomial.
roots of defined polynomial.
given approximation value of roots of defined polynomial.
approximation value of the algebraic number.
characteristic polynomial of the algebraic number.
field defined by the polynomial.
Compute the trace of the algebraic number.
Compute the norm of the algebraic number.
Change class to BasicAlgNumber.
Change class to MatAlgNumber.
operator | explanation |
a + b | Return a + b. |
a - b | Return a - b. |
a * b | Return a * b. a must be algebraic number or integer. |
a ** b | Return a ** b. b must be integer. |