-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
fix(polys): fix poly(expr) with mixed rational integer coefficients (1.13 branch) #26669
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. 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.13. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
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) | Change | Before [a36a8b23] <sympy-1.12.1^0> | After [741fa9ff] | Ratio | Benchmark (Parameter) |
|----------|--------------------------------------|---------------------|---------|----------------------------------------------------------------------|
| - | 68.3±1ms | 44.5±0.4ms | 0.65 | integrate.TimeIntegrationRisch02.time_doit(10) |
| - | 69.5±0.3ms | 44.0±0.2ms | 0.63 | integrate.TimeIntegrationRisch02.time_doit_risch(10) |
| + | 19.1±0.4μs | 30.8±0.4μs | 1.61 | integrate.TimeIntegrationRisch03.time_doit(1) |
| - | 73.5±0.3ms | 28.3±0.1ms | 0.39 | polys.TimeGCD_GaussInt.time_op(1, 'dense') |
| - | 26.1±0.04ms | 16.7±0.05ms | 0.64 | polys.TimeGCD_GaussInt.time_op(1, 'expr') |
| - | 74.4±0.4ms | 28.6±0.2ms | 0.38 | polys.TimeGCD_GaussInt.time_op(1, 'sparse') |
| - | 256±4ms | 123±0.7ms | 0.48 | polys.TimeGCD_GaussInt.time_op(2, 'dense') |
| - | 256±2ms | 124±1ms | 0.49 | polys.TimeGCD_GaussInt.time_op(2, 'sparse') |
| - | 660±2ms | 371±1ms | 0.56 | polys.TimeGCD_GaussInt.time_op(3, 'dense') |
| - | 664±2ms | 371±2ms | 0.56 | polys.TimeGCD_GaussInt.time_op(3, 'sparse') |
| - | 501±0.9μs | 287±1μs | 0.57 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(1, 'dense') |
| - | 1.79±0.01ms | 1.05±0ms | 0.59 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(2, 'dense') |
| - | 5.79±0.03ms | 3.09±0.02ms | 0.53 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(3, 'dense') |
| - | 457±2μs | 234±1μs | 0.51 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(1, 'dense') |
| - | 1.48±0.01ms | 669±3μs | 0.45 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(2, 'dense') |
| - | 4.96±0ms | 1.65±0.01ms | 0.33 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(3, 'dense') |
| - | 376±2μs | 205±0.6μs | 0.55 | polys.TimeGCD_SparseGCDHighDegree.time_op(1, 'dense') |
| - | 2.43±0.02ms | 1.25±0.01ms | 0.52 | polys.TimeGCD_SparseGCDHighDegree.time_op(3, 'dense') |
| - | 9.95±0.06ms | 4.32±0.03ms | 0.43 | polys.TimeGCD_SparseGCDHighDegree.time_op(5, 'dense') |
| - | 361±2μs | 172±1μs | 0.48 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(1, 'dense') |
| - | 2.57±0.01ms | 909±5μs | 0.35 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(3, 'dense') |
| - | 9.66±0.04ms | 2.68±0.02ms | 0.28 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(5, 'dense') |
| - | 1.02±0.01ms | 429±2μs | 0.42 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(3, 'dense') |
| - | 1.72±0.01ms | 495±2μs | 0.29 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(3, 'sparse') |
| - | 6.03±0.07ms | 1.78±0.01ms | 0.3 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(5, 'dense') |
| - | 8.47±0.03ms | 1.47±0ms | 0.17 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(5, 'sparse') |
| - | 281±0.8μs | 65.3±0.8μs | 0.23 | polys.TimePREM_QuadraticNonMonicGCD.time_op(1, 'sparse') |
| - | 3.41±0.04ms | 388±2μs | 0.11 | polys.TimePREM_QuadraticNonMonicGCD.time_op(3, 'dense') |
| - | 4.07±0.06ms | 276±0.6μs | 0.07 | polys.TimePREM_QuadraticNonMonicGCD.time_op(3, 'sparse') |
| - | 7.10±0.1ms | 1.28±0.02ms | 0.18 | polys.TimePREM_QuadraticNonMonicGCD.time_op(5, 'dense') |
| - | 8.63±0.1ms | 826±3μs | 0.1 | polys.TimePREM_QuadraticNonMonicGCD.time_op(5, 'sparse') |
| - | 4.97±0.03ms | 2.95±0.01ms | 0.59 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(2, 'sparse') |
| - | 12.0±0.06ms | 6.60±0.03ms | 0.55 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(3, 'dense') |
| - | 22.4±0.07ms | 8.96±0.03ms | 0.4 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(3, 'sparse') |
| - | 5.23±0.03ms | 865±4μs | 0.17 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(1, 'sparse') |
| - | 12.6±0.05ms | 6.93±0.01ms | 0.55 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(2, 'sparse') |
| - | 102±1ms | 26.1±0.03ms | 0.26 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(3, 'dense') |
| - | 168±0.7ms | 53.0±0.3ms | 0.32 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(3, 'sparse') |
| - | 173±1μs | 113±0.8μs | 0.65 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(1, 'dense') |
| - | 356±1μs | 213±2μs | 0.6 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(1, 'sparse') |
| - | 4.26±0.02ms | 841±4μs | 0.2 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(3, 'dense') |
| - | 5.30±0.01ms | 379±0.9μs | 0.07 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(3, 'sparse') |
| - | 19.9±0.05ms | 2.82±0.01ms | 0.14 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(5, 'dense') |
| - | 22.7±0.2ms | 622±0.9μs | 0.03 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(5, 'sparse') |
| - | 487±7μs | 138±1μs | 0.28 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(1, 'sparse') |
| - | 4.78±0.03ms | 613±5μs | 0.13 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(3, 'dense') |
| - | 5.35±0.04ms | 140±0.1μs | 0.03 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(3, 'sparse') |
| - | 13.3±0.09ms | 1.30±0.01ms | 0.1 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(5, 'dense') |
| - | 14.2±0.1ms | 142±0.4μs | 0.01 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(5, 'sparse') |
| - | 137±1μs | 75.1±0.9μs | 0.55 | solve.TimeMatrixOperations.time_rref(3, 0) |
| - | 251±1μs | 89.6±1μs | 0.36 | solve.TimeMatrixOperations.time_rref(4, 0) |
| - | 23.9±0.08ms | 10.1±0.2ms | 0.42 | solve.TimeSolveLinSys189x49.time_solve_lin_sys |
| - | 28.5±0.2ms | 15.4±0.08ms | 0.54 | solve.TimeSparseSystem.time_linsolve_Aaug(20) |
| - | 54.7±0.3ms | 24.7±0.06ms | 0.45 | solve.TimeSparseSystem.time_linsolve_Aaug(30) |
| - | 28.0±0.2ms | 15.1±0.08ms | 0.54 | solve.TimeSparseSystem.time_linsolve_Ab(20) |
| - | 55.1±0.3ms | 24.9±0.1ms | 0.45 | solve.TimeSparseSystem.time_linsolve_Ab(30) |
Full benchmark results can be found as artifacts in GitHub Actions |
fixes gh-19755
fixes gh-26665
closes gh-20730
References to other Issues or PRs
Backport of gh-26666
Brief description of what is fixed or changed
Other comments
Release Notes
poly(expr)
involving mixed integer and rational coefficients was fixed. This indirectly fixes some other things likesolve
for some inputs where previously an exception was raised.