-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add some ring / field conformance tests #1707
base: master
Are you sure you want to change the base?
Conversation
Also remove redundant dense_poly_type methods.
... and fix some issues this revealed
aa0f0fa
to
2a5446b
Compare
I probably misunderstood something, but |
@@ -134,6 +132,10 @@ end | |||
# | |||
################################################################################ | |||
|
|||
function base_ring(L::LocalField) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be base_ring(L::LocalField) = base_field(L)
instead?
But base_ring
was never (intended to be) part of any useful interface, it was just indicating, in recursively defined rings, the previous step. Strictly here, base_ring
might even have been the polynomial ring...
base_field
, coefficient_ring/field
were intended to be more useful
return sum( [r[i]*b[i] for i in 1:n]) | ||
end | ||
|
||
# TODO/FIXME: implement isapprox so we can get rid of the following HACK: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? From the docs:
Approximation (floating point and ball arithmetic only)
isapprox(f::MyElem, g::MyElem; atol::Real=sqrt(eps()))
so it is not part of the normal ring/field interface I'd say
No I don't think you missed anything -- the general conformance tests should not require We'll fix the conformance test suite, and once that's there, I can adjust this PR (there are still a few valid changes in here, like a missing |
@@ -1,5 +1,12 @@ | |||
@testset "RelFinField" begin | |||
|
|||
@testset "conformance" begin | |||
F = Native.finite_field(3, 3, cached = false)[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thofma I thought we'd rather get rid of the RelFinField?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only replaced the ones in the prime decomposition of relative number fields. They might be used somewhere else still.
Thanks for the clarification. I am also happy to help with missing methods. |
... and fix some issues this revealed. In particular "missing"
base_ring
methodswhich the conformance tests kind of assume, but here in some cases "only"
base_field
methods were available.Contains #1706 because of overlap.