Diofant 0.10
27 Jan 2019
New features
New representation for elements of
AlgebraicField
, see #619, #631 and #763.Support towers of algebraic field extensions: ground domain for
AlgebraicField
can be also an instance ofAlgebraicField
, see #653.New subclasses of
AlgebraicField
:RealAlgebraicField
andComplexAlgebraicField
, see #669, #630 and #748. Thanks to Kalevi Suominen for help with review.Added
integer_digits()
, see #765.FiniteField
support prime power orders, forbid everything else, see #622 and #762.
Major changes
Stable enumeration of polynomial roots in
RootOf
, see #633, #658, #741 and #768. Thanks to Kalevi Suominen for the implementation idea and help with review.Support root isolation for polynomials with algebraic coefficients, see #673 and #630. Thanks to Kalevi Suominen for help with review.
Polynomials with algebraic coefficients will use algebraic number domains per default, see #478.
Compatibility breaks
Removed
DMF
class, see #620.Removed
K[x, y, ...]
sugar, usepoly_ring()
to create polynomial rings, see #622.Removed
FracField
class, see #622.get_field()
method for domains, derived fromCommutativeRing
, now is a property, e.g.field
, see #622.Removed
PolyRing
class, see #621.get_ring()
method for domains, derived fromCommutativeRing
, now is a property, e.g.ring
, see #621.Removed
compose
option forminimal_polynomial()
, usemethod
instead, see #624.field_isomorphism()
take fields as arguments, see #627.Functions
minimal_polynomial()
andprimitive_element()
returnPurePoly
instances, see #628.Removed
ANP
class, see #619.Removed
RealNumber
alias, see #635.Method
characteristic()
now is a property ofCharacteristicZero
andFiniteField
, see #636.Removed
of_type()
,abs()
,is_one()
,unify_with_symbols()
andmap()
methods andhas_CharacteristicZero
attribute ofDomain
, see #636, #704 and #637.Removed
is_unit()
,numer()
anddenom()
methods ofCommutativeRing
, see #637.Method
from_expr()
was renamed fromfrom_diofant()
, see #637.Removed
AlgebraicNumber
class, see #631.Removed
polys.distributedmodules
module, see #648.Removed
@public
decorator, see #666.Subs
now support onlySubs(expr, (var1, val1), (var2, val2), ...)
syntax, see #667.RootOf
don’t canonicalize anymore polynomials to have integer coefficients, useexpand_func()
instead, see #679.Removed
minpoly
alias forminimal_polynomial()
, see #684.Method
set_order()
was renamed fromfglm()
, see #688.Removed
row()
,col()
,row_del()
andcol_del()
methods ofMatrix
, see #688.Removed
add()
andmul()
methods forPolynomialRing
, see #697.Removed
itercoeffs()
,itermonoms()
,iterterms()
,listcoeffs()
,listmonoms()
,listterms()
,const()
,imul_num()
andsquare()
methods ofPolyElement
, see #697.Removed
abs()
,neg()
,add()
,add_ground()
,sub()
,sub_ground()
,mul()
,mul_ground()
,pow()
,sqr()
,nth()
,factor_list_include()
,revert()
,gff()
,gff_list()
,sqf_list_include()
,homogenize()
,homogeneous_order()
,eq()
andne()
methods ofPoly
, see #688, #701, #732, #717, #727, #729 and #747.subs()
support one argument (a mapping or an iterable of pairs), see #532.Renamed
is_sqf
property ofPoly
tois_squarefree
, see #724.Removed
all
option forsqf_list()
method, see #727.Renamed
has_Ring/Field
attributes ofDomain
tois_Ring/Field
, see #729.Removed
symmetric
option for polynomial functions, see #761.Removed
print_mathml()
function andtree
submodule, see #769.
Minor changes
Be sure that
minimal_polynomial()
returns an irreducible polynomial over specified domain, see #622.Support algebraic function fields in
minpoly_groebner()
, see #623.Added argument
method
forminimal_polynomial()
andMINPOLY_METHOD
configuration option to select default algorithm, see #624.primitive_element()
now return an algebraic integer and support algebraic fields, see #643, #655 and #659.Support
conjugate
,Abs
,re
andim
inminimal_polynomial()
, see #661 and #668.Mutable matrices support indexed deletion with
__delitem__()
, see #688.Integer powers of
RootOf
instances are automatically reduced, according to their minimal polynomial, see #691.Support gmpy2.mpz ground type for numerator/denominator of
Rational
, see #694.Added
FALLBACK_GCD_ZZ_METHOD
configuration option to specify GCD algorithm for polynomials with integer coefficients if heuristic GCD was off or just unlucky, see #721.Added
GCD_AA_METHOD
configuration option to specify GCD algorithm for polynomials with algebraic coefficients, see #721.sqf_part()
,sqf_norm()
,sqf_list()
methods andis_squarefree
property use notion of being square-free w.r.t. to all polynomial variables, see #726.100% test coverage for
core
,polys
andstats
modules. Overall test coverage is around 97%.
Developer changes
Issues closed
See the release milestone for complete list of issues and pull requests involved in this release.
These Sympy issues also were addressed:
sympy/sympy#14384 An unspecified power of x is reported to be O(log(x)**6)
sympy/sympy#14393 Incorrect limit
sympy/sympy#14414 Should QQ[x, y, …] syntax be removed?
sympy/sympy#13886 Raise an exception for non-prime p in FiniteFIeld(p)
sympy/sympy#14220 Should be there both PolyRing and PolynomialRing?
sympy/sympy#7724 roots should find the roots of x**4*I + x**2 + I
sympy/sympy#5850 minpoly() should use PurePoly
sympy/sympy#14494 make better decisions for minpoly based on domain
sympy/sympy#14389 AlgebraicNumber should be a domain element?
sympy/sympy#14291 poly(((x - 1)**2 + 1)*((x - 1)**2 + 2)*(x - 1)).all_roots() hangs
sympy/sympy#14590 limit((n**3*((n + 1)/n)**n)/((n + 1)*(n + 2)*(n + 3)), n, oo) is incorrect
sympy/sympy#14645 Bug when solving multivariate polynomial systems with identical equations
sympy/sympy#14294 to_number_field should be idempotent for single extension
sympy/sympy#14721 solve can’t find solution
sympy/sympy#14293 Sorting of polynomial roots
sympy/sympy#14380 AlgebraicField.numer() could return an algebraic integer
sympy/sympy#14442 Should AlgebraicField be a Composite domain?
sympy/sympy#14759 dup_isolate_real_roots_list() docstring is wrong
sympy/sympy#14782 integrate(sqrt(-x**2 + 1)*(-x**2 + x), [x, -1, 1]) is incorrect
sympy/sympy#14791 No solution is returned for solve(exp(log(5)*x) - exp(log(2)*x), x)
sympy/sympy#14793 Limit involving log(factorial(x)) incorrect
sympy/sympy#14811 Exception during evaluation of limit (only locally, not in the live version)
sympy/sympy#14822 RisingFactorial cannot do numerical (floating-point) evaluations
sympy/sympy#14820 octave/matlab codegen wrong for two argument zeta
sympy/sympy#14831 minpoly(-3*sqrt(12*sqrt(2) + 17) + 12*sqrt(2) + 17 -2*sqrt(2)*sqrt(12*sqrt(2) + 17), x) fails
sympy/sympy#14476 QQ.algebraic_field(Rational) should be just QQ
sympy/sympy#14885 Sympy series gives TypeError on x^(-3/2) * exp(x) at x = 0
sympy/sympy#15055 Incorrect limit of n**3*((-n - 1)*sin(1/n) + (n + 2)*sin(1/(n + 1)))/(-n + 1)
sympy/sympy#15056 dsolve: get_numbered_constants should consider Functions
sympy/sympy#6938 Undefined Functions should not use the evalf name lookup scheme
sympy/sympy#8945 integrate(sin(x)**3/x, (x, 0, 1)) can’t do it
sympy/sympy#15146 Incorrect limit (n/2) * (-2*n**3 - 2*(n**3 - 1) * n**2 * digamma(n**3 + 1) + 2*(n**3 - 1) * n**2 * digamma(n**3 +n + 1) + n + 3)
sympy/sympy#5934 PolynomialError with minpoly()
sympy/sympy#8210 Zero degree polynomial copy() error
sympy/sympy#11775 TypeError: unorderable types: PolyElement() < mpz() from factor_list
sympy/sympy#7047 Python and gmpy ground type specific stuff from “from sympy import *”
sympy/sympy#15323 limit of the derivative of (1-1/x)^x as x –> 1+ gives wrong answer
sympy/sympy#15344 mathematica_code gives wrong output with Max
sympy/sympy#12602 count_roots is extremely slow with Python ground types
sympy/sympy#5595 Should mpmath use the polys ground types?
sympy/sympy#5602 Poly should use free_symbols to check for variable dependence
sympy/sympy#5555 Explain coefficient domain handling in groebner()’s docstring
sympy/sympy#15407 BUG: dsolve fails for linear first order ODE with three equations
sympy/sympy#15311 3rd-order ODE with irrational coefficient fails
sympy/sympy#11668 Get rid of bare “except”s
sympy/sympy#4511 integrate(cos(x)**2 / (1-sin(x))) gives too complicated answer
sympy/sympy#15474 dsolve system gives complicated solution for diagonal system
sympy/sympy#15502 Python 3.7 test failures
sympy/sympy#15520 5th-order ODE with irrational coefficient fails
sympy/sympy#15539 Order at negative infinity
sympy/sympy#15561 SymPy’s Number.__divmod__ doesn’t agree with the builtin divmod
sympy/sympy#15574 dsolve fails for a system of independent equations
sympy/sympy#12695 [matrices] remove dead files densearith.py densetools.py and densesolve.py
sympy/sympy#5428 Should Poly use an algebraic domain by default?
sympy/sympy#14337 Poly constructor uses domain EX when it’s not necessary
sympy/sympy#8818 lambdify precision loss with module=mpmath from high-precision Floats
sympy/sympy#9544 Finite fields
sympy/sympy#15798 Poly.copy() does not copy unused generators
sympy/sympy#15810 integrate(1/(2**(2*x/3)+1), (x,0,oo)) is wrong