Skip to content
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

Change signature of / and \ methods #1480

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

fingolfin
Copy link
Member

... to match those of their counterpart functions divexact_right and
divexact_left: it seems more natural to expect to be able to divide
a ring element by floats or rationals than the other way around.

... to match those of their counterpart functions `divexact_right` and
`divexact_left`: it seems more natural to expect to be able to divide
a ring element *by* floats or rationals than the other way around.
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #1480 (df4da39) into master (b5090f4) will increase coverage by 2.09%.
Report is 3 commits behind head on master.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1480      +/-   ##
==========================================
+ Coverage   84.76%   86.86%   +2.09%     
==========================================
  Files         110      110              
  Lines       29370    28672     -698     
==========================================
+ Hits        24895    24905      +10     
+ Misses       4475     3767     -708     
Files Coverage Δ
src/NCRings.jl 89.24% <0.00%> (ø)
src/Rings.jl 52.54% <0.00%> (-0.91%) ⬇️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@fingolfin
Copy link
Member Author

Grr, while this fixes a JET warning, it introduces ambiguities:

ERROR: LoadError: LoadError: LoadError: MethodError: /(::Nemo.fpFieldElem, ::Int64) is ambiguous. Candidates:
  /(x::AbstractAlgebra.NCRingElem, y::Union{AbstractFloat, Integer, Rational}) in AbstractAlgebra at /home/runner/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/NCRings.jl:123
  /(x::AbstractAlgebra.RingElem, y::AbstractAlgebra.RingElement) in AbstractAlgebra at /home/runner/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Rings.jl:34
Possible fix, define
  /(::AbstractAlgebra.RingElem, ::Union{AbstractFloat, Integer, Rational})

@thofma thofma merged commit 0548313 into Nemocas:master Nov 2, 2023
13 of 15 checks passed
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