-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Fixed bug when trying to simplify non-linear relationals #21873
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
Fixed bug when trying to simplify non-linear relationals #21873
Conversation
✅ Hi, I am the SymPy bot (v161). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.9. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
9f14aec
to
62ff0c9
Compare
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) Significantly changed benchmark results (master vs previous release) before after ratio
[ed9a550f] [3ba05b51]
<sympy-1.8^0>
- 952±4ms 129±0.3ms 0.14 dsolve.TimeDsolve01.time_dsolve
- 8.85±0s 4.25±0.01s 0.48 integrate.TimeIntegrationRisch02.time_doit(100)
- 8.82±0.01s 4.26±0.02s 0.48 integrate.TimeIntegrationRisch02.time_doit_risch(100)
- 74.1±0.4μs 29.9±0.06μs 0.40 matrices.TimeDiagonalEigenvals.time_eigenvals
- 84.4±0.1μs 52.0±0.08μs 0.62 solve.TimeMatrixArithmetic.time_dense_add(10, 0)
+ 88.5±0.1μs 133±0.5μs 1.50 solve.TimeMatrixArithmetic.time_dense_add(10, 5)
+ 11.5±0.03μs 18.9±0.05μs 1.64 solve.TimeMatrixArithmetic.time_dense_add(3, 0)
+ 13.8±0.04μs 30.4±0.09μs 2.20 solve.TimeMatrixArithmetic.time_dense_add(3, 5)
+ 20.6±0.06μs 39.3±0.1μs 1.91 solve.TimeMatrixArithmetic.time_dense_add(4, 5)
+ 37.2±0.05μs 64.0±0.2μs 1.72 solve.TimeMatrixArithmetic.time_dense_add(6, 5)
- 1.28±0ms 218±0.3μs 0.17 solve.TimeMatrixArithmetic.time_dense_multiply(10, 0)
- 48.7±0.1μs 24.6±0.06μs 0.51 solve.TimeMatrixArithmetic.time_dense_multiply(3, 0)
+ 75.3±0.2μs 132±0.2μs 1.75 solve.TimeMatrixArithmetic.time_dense_multiply(3, 5)
- 103±1μs 31.2±0.02μs 0.30 solve.TimeMatrixArithmetic.time_dense_multiply(4, 0)
- 306±3μs 63.0±0.09μs 0.21 solve.TimeMatrixArithmetic.time_dense_multiply(6, 0)
- 90.2±0.3μs 43.3±0.07μs 0.48 solve.TimeMatrixOperations.time_det(3, 0)
- 165±0.2μs 99.9±0.3μs 0.61 solve.TimeMatrixOperations.time_det(3, 2)
- 156±0.4μs 91.6±0.09μs 0.59 solve.TimeMatrixOperations.time_det(3, 5)
- 90.6±0.4μs 43.5±0.2μs 0.48 solve.TimeMatrixOperations.time_det_bareiss(3, 0)
- 165±0.1μs 100±0.2μs 0.61 solve.TimeMatrixOperations.time_det_bareiss(3, 2)
- 156±0.3μs 92.0±0.1μs 0.59 solve.TimeMatrixOperations.time_det_bareiss(3, 5)
- 90.7±0.3μs 43.6±0.1μs 0.48 solve.TimeMatrixOperations.time_det_berkowitz(3, 0)
- 165±0.2μs 100±0.2μs 0.61 solve.TimeMatrixOperations.time_det_berkowitz(3, 2)
- 156±0.3μs 91.5±0.2μs 0.59 solve.TimeMatrixOperations.time_det_berkowitz(3, 5)
+ 710±0.7μs 1.11±0ms 1.56 solve.TimeMatrixOperations.time_det_berkowitz(4, 0)
+ 852±1μs 1.62±0ms 1.90 solve.TimeMatrixOperations.time_det_berkowitz(4, 2)
+ 893±0.7μs 1.72±0ms 1.93 solve.TimeMatrixOperations.time_det_berkowitz(4, 5)
+ 264±0.7μs 428±1μs 1.62 solve.TimeMatrixOperations.time_rank(3, 0)
+ 414±1μs 654±1μs 1.58 solve.TimeMatrixOperations.time_rank(4, 0)
- 5.13±0.01ms 2.80±0ms 0.55 solve.TimeRationalSystem.time_linsolve(10)
- 1.03±0ms 648±0.6μs 0.63 solve.TimeRationalSystem.time_linsolve(5)
+ 3.07±0ms 4.65±0.01ms 1.52 solve.TimeSparseSystem.time_linear_eq_to_matrix(20)
+ 6.21±0.01ms 9.51±0.03ms 1.53 solve.TimeSparseSystem.time_linear_eq_to_matrix(30)
- 1.21±0ms 798±1μs 0.66 solve.TimeSparseSystem.time_linsolve_eqs(10)
- 2.27±0ms 1.44±0ms 0.64 solve.TimeSparseSystem.time_linsolve_eqs(20)
- 3.35±0.01ms 2.10±0ms 0.63 solve.TimeSparseSystem.time_linsolve_eqs(30)
Full benchmark results can be found as artifacts in GitHub Actions |
References to other Issues or PRs
Closes #21869
Brief description of what is fixed or changed
The previous code indirectly assumed that certain forms of non-linear expressions didn't show up. Here, it is fixed so that this doesn't happen. Also, this will simplify slightly better in terms of several Eq with the same variable, earlier, if the first one didn't allow extraction of the value (i.e. being linear) it was not simplified later either.
Other comments
Release Notes