Skip to content

multiply by a rational instead of dividing by an integer #738

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karlwessel
Copy link
Contributor

Dividing symbolics by an integer returns a multiplication by a rational. This fix makes sure that it is handled the same when creating a Div.

This fixes issue #736.

Copy link
Contributor

Benchmark Results

master b1c3832... master / b1c3832...
overhead/acrule/a+2 0.96 ± 0.3 μs 0.988 ± 0.27 μs 0.972 ± 0.4
overhead/acrule/a+2+b 0.941 ± 0.26 μs 0.987 ± 0.29 μs 0.953 ± 0.38
overhead/acrule/a+b 0.264 ± 0.026 μs 0.268 ± 0.12 μs 0.984 ± 0.43
overhead/acrule/noop:Int 1.56 ± 0.01 ns 1.56 ± 0.01 ns 1 ± 0.0091
overhead/acrule/noop:Sym 27 ± 6 ns 27.5 ± 0.46 ns 0.981 ± 0.22
overhead/get_degrees/large_poly 0.156 ± 0.0093 s 0.432 ± 0.03 s 0.36 ± 0.033
overhead/rule/noop:Int 0.035 ± 0.023 μs 0.0364 ± 0.025 μs 0.963 ± 0.91
overhead/rule/noop:Sym 0.0337 ± 0.024 μs 0.0333 ± 0.023 μs 1.01 ± 1
overhead/rule/noop:Term 0.0332 ± 0.024 μs 0.0334 ± 0.024 μs 0.994 ± 1
overhead/ruleset/noop:Int 0.118 ± 0.034 μs 0.119 ± 0.037 μs 0.99 ± 0.42
overhead/ruleset/noop:Sym 0.125 ± 0.038 μs 0.12 ± 0.039 μs 1.05 ± 0.47
overhead/ruleset/noop:Term 5.06 ± 0.67 μs 4.78 ± 0.81 μs 1.06 ± 0.23
overhead/simplify/noop:Int 0.318 ± 0.009 μs 0.239 ± 0.033 μs 1.33 ± 0.19
overhead/simplify/noop:Sym 0.315 ± 0.0063 μs 0.247 ± 0.032 μs 1.28 ± 0.17
overhead/simplify/noop:Term 0.0508 ± 0.0056 ms 0.0486 ± 0.0028 ms 1.05 ± 0.13
overhead/simplify/randterm (+, *):serial 0.123 ± 0.011 s 0.124 ± 0.012 s 0.989 ± 0.13
overhead/simplify/randterm (+, *):thread 0.0701 ± 0.0055 s 0.0705 ± 0.0056 s 0.995 ± 0.11
overhead/simplify/randterm (/, *):serial 0.246 ± 0.023 ms 0.253 ± 0.022 ms 0.972 ± 0.12
overhead/simplify/randterm (/, *):thread 0.279 ± 0.027 ms 0.284 ± 0.03 ms 0.981 ± 0.14
overhead/substitute/a 0.106 ± 0.011 ms 0.105 ± 0.011 ms 1.01 ± 0.15
overhead/substitute/a,b 0.09 ± 0.01 ms 0.0909 ± 0.0069 ms 0.99 ± 0.14
overhead/substitute/a,b,c 20.2 ± 2.1 μs 20.1 ± 2.2 μs 1 ± 0.15
polyform/easy_iszero 0.0422 ± 0.0058 ms 0.0427 ± 0.0059 ms 0.989 ± 0.19
polyform/isone 3.1 ± 0.01 ns 3.11 ± 0.01 ns 1 ± 0.0046
polyform/iszero 1.43 ± 0.049 ms 1.43 ± 0.048 ms 1 ± 0.048
polyform/simplify_fractions 1.9 ± 0.094 ms 1.93 ± 0.14 ms 0.986 ± 0.087
time_to_load 1.13 ± 0.024 s 1.13 ± 0.0044 s 1 ± 0.022

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants