-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New set of sympy's fixes #275
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 tasks
skirpichev
force-pushed
the
sympy-backports4
branch
3 times, most recently
from
May 22, 2016 11:32
f28f7b4
to
f1ff3cb
Compare
skirpichev
force-pushed
the
sympy-backports4
branch
2 times, most recently
from
June 26, 2016 07:48
9380e83
to
429bc1f
Compare
Speedup differentiation of expressions by using xreplace instead of subs. // minor edits by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// minor edits by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Also added test for issue sympy/sympy#9908 // minor edits by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// minor edits by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// minor edits by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Fractions with integer one in either the numerator or the denominator would make it possible to cancelled out any common factor from the numerator and the denominator. However, in the current implementation, there is no special treatment for this situation. The computation of the GCD with integer one would take a long time by using the Euclidean algorithm, as in the issue sympy/sympy#9341. As a result, in this commit, when called with expressions, the cancel function will directly return the quotient when an integer unity is found. This could solve issue #9314. And when the function is called with polynomials directly or called with tuples, this short-cut will not be invoked to better preserve its original behaviour in internal use. Add one as special case in computing GCD of DMP In the GCD computation of dense multivariate polynomials, previously in function `sympy.polys.euclidtools._dmp_rr_trivial_gcd`, only the special cases with one of the polynomials being zero is specially treated as trivial case. However, the polynomial of constant unity is the unit of the multiplication operation in the ring, so it cannot possibly have other GCD with any polynomial. So now one is being handled as a special case as well to skip the later expensive operations. Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
When one cannot determine it is an integer, it should return None, and not False. This closes issue sympy/sympy#10024. Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Removing this line beacause the logic behind this line is wrong, beacause no subclasses return None for _contain. it seems that this should check for every finite set but simpify return none for this line to be tested, but for finite set simpify does not return none.so both statement are controductory to each other. Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
The comment in the last code sample was wrong. Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Tests are taken from sympy/sympy#9814
// edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Closes sympy/sympy#10092 // edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Closes sympy/sympy#10161 Fixed in 1e06e01.
This example uses, as of now, the old pyglet plotting module which is not working right now. Changed so that it uses the new plot API. Fixes sympy/sympy#10243 // edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Remove unused variables, and fix a potential nondeterminism issue. // edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Previously, this did not work, because it could not recognize x**x as exp(x*log(x)) unless there already was a log(x) in the expression somewhere. Now, we manually add log(x) to the extension as soon as we see a nonelementary monomial of this form (with a symbolic base). Of course, x**x has no elementary integral, but now risch_integrate is capable of determining this without explicitly rewriting it as exp(x*log(x)). I don't know of any examples of integrands that have elementary integrals of this form with symbolic bases that don't also include the log of the base, but I haven't looked very hard. Also update the doctest in risch_integrate() to use this, because that's what I wanted to use in the first place (I just never got around to fixing this). // edited by skirpichev: added filtering for symlogs Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Closes sympy/sympy#10274 // edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
docs fixes, `in` operator now works correctly for PermutationGroup .elements for PermutationGroup introduced equality of two PermutationGroups Two Permutation Groups are equal if the set of elements generated by the generators of two groups are equal // edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// edited by skirpichev: fix hashing Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Now >>> init_printing(use_unicode=True) >>> Cycle(1, 2, 4)(5, 6) (1 2 4)(5 6) >>> latex(Cycle(1, 2, 4)(5, 6)) '\\left( 1\\; 2\\; 4\\right)\\left( 5\\; 6\\right)' same printing for Permutation tests fixes fixes sympy/sympy#10210 // edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Quadratic equations with nonsquare discriminant are solved by transforming to generalized Pell equations ``X**2 - D*Y**2 = N``. The rational solutions of the two equations correspond to each other. In addition, the transformation can be chosen such that all integer- valued solutions of the original equation correspond to integer-valued solutions of the Pell equation. However, not all integer-valued solutions of the Pell equation correspond to integer-valued solutions of the original equation, because the rational coefficients of the inverse transformation are not integers, in general. The integer-valued solutions of the generalized Pell equation are as follows. There is a finite number of fundamental solutions ``(X, Y)``, and all solutions are obtained as coefficients of 1 and ``d = sqrt(D)`` in ``(X + d*Y)*(U + d*V)`` for all solutions of the Pell equation ``U**2 - D*V**2 = 1``. On the other hand, the solutions of the Pell equation are given by the powers ``U_i + d*V_i = (U + d*V)**i`` of a single primitive solution ``(U, V)`` and their negatives. The integer solutions of the original equation are then found with the following steps. 1. Find the fundamental solutions of the generalized Pell equation. 2. Find the primitive solution ``(U, V)`` of Pell's equation. 3. Find the least positive integer ``k`` such that ``(U_k, V_k)`` is congruent to ``(1, 0)`` modulo the lcm ``L`` of the denominators of the coefficients of the inverse transformation. 4. For each fundamental solution ``(X, Y)`` find the solutions ``(x_i, y_i)`` of the original equation corresponding to ``X_i + d*Y_i = (X + d*Y)*(U + d*V)**i for i in range(k)``. 5. For each pair ``(x_i, y_i)`` of integer-valued solutions add all solutions corresponding to ``(X_i + d*Y_i)*(U_k + d*V_k)**t`` for all integers ``t``. // edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
1) fix runtime error (closes sympy/sympy#9539) 2) always return a valid solution when a solution exists. // edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
// edited by skirpichev Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
There was a small grammatical error. Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Drop untested and/or inaccessible code, add some trivial tests.
skirpichev
force-pushed
the
sympy-backports4
branch
from
July 17, 2016 14:35
d95be0a
to
4bdc45d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
title_doc
changed sympy/sympy#9781 - no, solvesetsolveset_real(x**3+1, x)
returnsFiniteSet(-1)
sympy/sympy#9804 - no, solvesetInterval - FiniteSet(x)
is now returned unevaluated sympy/sympy#9682 - no, better solution implemented__eq__
method of S.Reals sympy/sympy#9822 - no such "fixes", pleaseinvert_real
for sin and cos now operates correctly sympy/sympy#9591 - no, solvesetnot_empty_in
added tocodomain.py
sympy/sympy#9779 - noseries
method for ring series sympy/sympy#9775 - no, new seriesEq(sin(Abs(x)), 1)
no longer returns ConditionSet sympy/sympy#9847 - no, solvesetlimit_seq
insideLimit.doit
sympy/sympy#9968 - no, limit_seqprng
parameter to randMatrix sympy/sympy#8752 - nocontains
result against S.true sympy/sympy#10088 - noe
handling sympy/sympy#10029 - ok=
in parse_expr. sympy/sympy#9255 - no, parsing// stuff from 2015, previous pr: #116
Also