Diofant 0.11
22 Apr 2020
New features
Added
discrete_log()
to compute discrete logarithms, see #785. Thanks to Gabriel Orisaka.Support inhomogenous case for systems of linear ODEs with constant coefficients, see #919.
Support domains pickling, see #972.
Major changes
Poly
now use sparse polynomial representation (viaPolyElement
) internally, see #795.solve()
now return all solutions for equations, involving surds, see #910.Module
galoistools
was adapted to useFiniteField
’s and usual conventions for low-level methods of thepolys
module, see #957, #971 and #964. Polynomial factorization now works for univariate polynomials over anyFiniteField
’s domain.Module
euclidtools
was ported to use sparse polynomial representation, see #994.
Compatibility breaks
Removed support for Python 3.5 and 3.6, see #775.
Removed
log()
helper fromRationalField
, see #787.Removed
seterr()
function, see #794.Removed
DMP
class, see #795.Removed
ring_series
module, see #820.Removed
is_nonnegative()
,is_nonpositive()
andis_positive()
methods ofDomain
subclasses, see #834 and #975.Change order of keyword arguments for
integrate()
, see #834.Removed support for
dps=''
inFloat
. Significant digits automatically counted forint
andstr
inputs, see #797.Removed
numer/denom
properties ofFracElement
, see #851.Removed
is_hermitian/is_antihermitian
core properties, see #873.Removed
print_python()
andprint_ccode()
functions, see #891.Reorder output for
jordan_form()
andjordan_cells()
, the last one is now optional, see #896.Removed
generate_oriented_forest()
,kbins()
andibin()
functions, see #903.Removed support for
numexpr
module inlambdify()
andNumExprPrinter
printer class, see #903.Removed
DeferredVector
class, see #905.Don’t export too much from
solvers
to the default namespace, keep onlysolve()
,rsolve()
anddsolve()
functions, see #921.Make
rsolve()
’sinit
parameter more compatible withdsolve()
’s one, e.g. drop acceptinginit=[1, 2, 3]
andinit={0: 1, 1: 2, 2: 3}
forms, see #921.Removed
dict_merge()
,generate_bell()
andreshape()
functions, see #921.Removed
subs()
methods fromPolyElement
andFracElement
, see #967.is_negative()
method ofDomain
refactored to theis_normal()
, see #977.Removed
algebraic_field()
method ofIntegerRing
, see #977.Removed
has_assoc_Field
property,is_SymbolicDomain
property renamed tois_ExpressionDomain
ofDomain
, see #977.drop_to_ground()
method ofPolynomialRing
renamed toeject()
, see #977.Renamed option misspeled option
bareis
tobareiss
indet()
andwronskian()
, see #866.Removed
nth_power_roots_poly()
,ground_roots()
,refine_root()
,intervals()
andsturm()
functions andnth_power_roots_poly()
,ltrim()
,ground_roots()
,refine_root()
,intervals()
,max_norm()
,l1_norm()
andsturm()
methods ofPoly
, see #996.
Minor changes
Support truncation for elements of
RealAlgebraicField
toint
, see #788.Matrix
’s andArray
’s support symbolic indexes, see #785. Thanks to Francesco Bonazzi.Added
AA_FACTOR_METHOD
configuration option to specify factorization algorithm for polynomials with algebraic coefficients, see #844.CCodeGen
got support for common subexpression replacement, see #893. Thanks to James Cotton.100% test coverage for
utilities
module.rsolve()
gotsimplify
option to control default output simplification, see #921.Function
rsolve()
got initial support for systems of equations, see #921.minimal_polynomial()
got support forRootOf
instances over algebraic number fields, see #927.The
CommutativeRing
and all derived classes gotcharacteristic
property, see #968.Correct wrong implementations of factorization algorithms over finite fields, see #968 and #964. Thanks to Kalevi Suominen for help with review.
Developer changes
Depend on sphinxcontrib-bibtex to track the bibliography, see #766.
Use Github Actions for CI, instead of the Travis CI, see #887.
Depend on flake8-rst to test formatting of docstrings, see #928.
Depend on flake8-quotes, see #982.
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#15943 Wrong result from summation
sympy/sympy#12163 matematica code printer does not handle floats and derivatives correctly
sympy/sympy#11642 Geometric sum doesn’t evaluate with float base
sympy/sympy#15984 Value error in limit
sympy/sympy#7337 Wrong integration result
sympy/sympy#11600 re and im should work for matrix expressions
sympy/sympy#16038 solve_poly_system works with integers but not floats
sympy/sympy#15553 rsolve can not solve this kind of recurrences
sympy/sympy#11581 conjugate of real expression should not change expression
sympy/sympy#11976 Typo in ellipse.py
sympy/sympy#11275 LaTeX printer inconsistent with pretty printer
sympy/sympy#11841 Function(‘gamma’) pretty prints as Γ
sympy/sympy#11926 ccode does not accept user_functions for Max and Min
sympy/sympy#11855 DiracDelta function is zero for nonzero arguments
sympy/sympy#11955 diophantine gives wrong solution for -4*x**2+4*x*y-y**2+2*x-3
sympy/sympy#11502 Discrete logarithms
sympy/sympy#11435 str printing of logic expressions should use operators
sympy/sympy#12200 coeff docstring is wrong
sympy/sympy#9123 apart drops term
sympy/sympy#12177 Wrong result with apart Wrong Result
sympy/sympy#8129 The probability function does not handle expressions like b>=b
sympy/sympy#9983 Product(1 + 1/n**(S(2)/3), (n, 1, oo)).doit() raise RunTimeError
sympy/sympy#11726 pde_separate does not allow expressions as input
sympy/sympy#11981 powsimp() fails with noncommutative variables
sympy/sympy#12092 evalf does not call _imp_ recursively
sympy/sympy#10472 pprint should align the middle of the matrix to the baseline?
sympy/sympy#11959 diophantine gives wrong solution for -4*x**2+4*x*y-y**2+2*x-3
sympy/sympy#11944 matrix vstack/hstack can fail with immutable matrix as first argument
sympy/sympy#11732 Fails operators between Interval and some S.Sets
sympy/sympy#12178 Empty intersection should be UniversalSet
sympy/sympy#10681 TypeError: ‘Float’ object cannot be interpreted as an integer from integrate(r**2*(R**2-r**2)**0.5, r)
sympy/sympy#11078 TypeError: ‘Float’ object cannot be interpreted as an integer from integrate((6-x*x)**(1.5))
sympy/sympy#11877 integrate(log(0.5-x), (x, 0, 0.5)) wrongly produces imaginary part
sympy/sympy#7337 Wrong integration result
sympy/sympy#10211 integrate((1/sqrt(((y-x)**2 + h**2))**3), (x,0,w), (y,0,w)) is wrong
sympy/sympy#11806 Incorrectly evaluating integral
sympy/sympy#12325 string formatting error in dmp_integrate_in
sympy/sympy#16222 Poly(E**100000000) is slow to create
sympy/sympy#15413 rootof fails for polynomial with irrational coefficients
sympy/sympy#16432 a.is_even does not imply a.is_finite
sympy/sympy#16431 a.is_zero is False does not imply a.is_nonzero is True
sympy/sympy#16530 (1/x).is_real should be None if x can be zero
sympy/sympy#16562 Eq with 1 argument is allowed?
sympy/sympy#16589 roots gives incorrect result
sympy/sympy#16714 Limit ((n**(n+1) + (n+1)**n) / n**(n+1))**n recursion error
sympy/sympy#16774 square proportion match has no result
sympy/sympy#17034 isqrt gives incorrect results
sympy/sympy#17044 is_square gives incorrect answers
sympy/sympy#10996 Bug in polynomial GCD computation
sympy/sympy#15282 Works too long on some limits with big powers
sympy/sympy#16722 limit(binomial(n + z, n)*n**-z, n, oo) gives different answers based on assumptions of n and z
sympy/sympy#15673 Wrong results. (Limit, Integral, sphere(Space polar coordinates))
sympy/sympy#17380 Incorrect results given by some limit expressions
sympy/sympy#17431 Wrong results. (Limit, factorial, Power)
sympy/sympy#17492 Add link to GitHub in the Sphinx documentation
sympy/sympy#17555 (-x).is_extended_positive fails for extended_real and infinite
sympy/sympy#17556 Mul.is_imaginary fails for infinite values
sympy/sympy#17453 Pow._eval_is_ error
sympy/sympy#17719 plot_implicit error for Xor
sympy/sympy#12386 Latex printer for MutableDenseNDimArray, MutableSparseNDimArray
sympy/sympy#12369 Start using spherical_jn from SciPy
sympy/sympy#17792 Wrong limit
sympy/sympy#17789 Intermittent test failure in assumptions
sympy/sympy#17841 integrate throws error for rational functions involving I
sympy/sympy#17847 Wrong result for as_leading_term()
sympy/sympy#17982 Wrong result from rsolve
sympy/sympy#9244 dsolve: nonhomogeneous linear systems are not supported
sympy/sympy#15946 Matrix exponential for dsolve
sympy/sympy#16635 problem when using dsolve() to solve ordinary differential equations
sympy/sympy#14312 Incorrect solution of 3 by 3 linear ODE systems
sympy/sympy#8859 wrong result: dsolve for systems with forcings
sympy/sympy#9204 dsolve fails
sympy/sympy#14779 Spurious solutions when solving equation involving Abs(x)/x
sympy/sympy#18008 series does not give the same expansion depending on whether simple expression is simplified or not
sympy/sympy#8810 Poly keyword ‘composite’ is ignored when instantiating from Poly
sympy/sympy#18118 limit(sign(sin(x)), x, 0, ‘+’)) = 0 (which is wrong)
sympy/sympy#6599 limit of fraction with oscillating term in the numerator calculated incorrectly
sympy/sympy#18176 Incorrect value for limit(x**n-x**(n-k),x,oo) when k is a natural number
sympy/sympy#18306 NotImplementedError in limit
sympy/sympy#8695 sqf and sqf_list output is not consistant
sympy/sympy#18378 Invalid result in Limit
sympy/sympy#18384 abs(sin(x)*cos(x)) integrates wrong
sympy/sympy#18399 Incorrect limit
sympy/sympy#18452 Infinite recursion while computing Limit of Expression in 1.5.1
sympy/sympy#18470 nan**0 returns 1 instead of nan
sympy/sympy#18482 Incorrect evaluation of limit
sympy/sympy#18499 The result of (1/oo)**(-oo) should be oo
sympy/sympy#18501 Extraneous variable in limit result
sympy/sympy#18508 NotImplementedError in limit
sympy/sympy#18507 Bug in Mul
sympy/sympy#18707 There is a problem or limitation when the Limit is calculated
sympy/sympy#18751 handling of rsolve coefficients
sympy/sympy#18749 polys: Berlekamp factorization failure
sympy/sympy#18895 Factor with extension=True drops a factor of y - 1
sympy/sympy#18894 sring extension=True error: nan is not in any domain
sympy/sympy#18531 apart: hangs or takes too long
sympy/sympy#14806 Domain.is_positive (and friends) is a wrong interface
sympy/sympy#18874 Zero divisor from sring over QQ<sqrt(2) + sqrt(5)>
sympy/sympy#16620 Slow factor(x^n-1, modulus=2) computation for some “difficult” n
sympy/sympy#18997 Incorrect limit result involving Abs, returns expression involving a symbol
sympy/sympy#18992 Possibly incorrect limit related to Stirling’s formula
sympy/sympy#19026 Bug in Limit
sympy/sympy#12303 Ellipse comparison with other geometric entities throws an error
sympy/sympy#11986 Typo Error in mathml.py
sympy/sympy#12361 Misspelling of “Bareiss” in Matrix module
sympy/sympy#12452 is_upper() raises IndexError for tall matrices
sympy/sympy#19070 bug in poly
sympy/sympy#16971 is_extended_real should not evaluate if sign is not known