-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
activate dead code to factor constant term when solving binomial equation #22781
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
Conversation
✅ Hi, I am the SymPy bot (v163). 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.11. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
_solve
b26dbba
to
f2f6f17
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
[907895ac] [306c0f2c]
- 215±0.7ms 132±0.6ms 0.61 large_exprs.TimeLargeExpressionOperations.time_subs
- 15.0±0.01ms 9.81±0.04ms 0.65 matrices.TimeMatrixExpression.time_MatAdd_doit
- 227±0.8μs 104±0.2μs 0.46 matrices.TimeMatrixExpression.time_MatMul
- 14.4±0.04ms 7.49±0.09ms 0.52 matrices.TimeMatrixExpression.time_MatMul_doit
- 4.18±0.03s 306±2ms 0.07 polygon.PolygonArbitraryPoint.time_bench01
+ 3.32±0.01ms 5.54±0.02ms 1.67 solve.TimeMatrixOperations.time_det(4, 2)
+ 3.33±0.01ms 5.56±0.02ms 1.67 solve.TimeMatrixOperations.time_det_bareiss(4, 2)
+ 37.2±0.2ms 65.5±0.3ms 1.76 solve.TimeMatrixSolvePyDySlow.time_linsolve(1)
+ 37.6±0.1ms 66.0±0.3ms 1.75 solve.TimeMatrixSolvePyDySlow.time_solve(1)
Full benchmark results can be found as artifacts in GitHub Actions |
This might be cheating the simplify=False flag. But unless solve would preserve this structure, the expansion step of the solve process is destroyed and with the check that the symbol dependent part contain powers, this is perhaps targeted enough to be warranted.
Code was dead because
f.length
is a method that can never equal 2. Code has now been corrected and updated to handle the re-factoring of the constant term that is expanded when the Poly is made.References to other Issues or PRs
fixes #22768
closes #22770
Brief description of what is fixed or changed
Other comments
Release Notes
x**3 - (1 - y)**6
forx
.