AbstractAlgebra.jl icon indicating copy to clipboard operation
AbstractAlgebra.jl copied to clipboard

"Creation" of RealField differs from Nemo

Open albinahlback opened this issue 4 years ago • 3 comments

From Nemo I expect recieving a parent, not an element.

julia> RR = RealField(50)
50.0

If not an issue, feel free to close.

albinahlback avatar Mar 11 '21 18:03 albinahlback

We can leave it open, but RealField is the parent here as far as AbstractAlgebra is concerned. It's not likely we will have time to address this.

If you consider it important, feel free to work on it, but we ourselves don't use the RealField in AbstractAlgebra, only the one in Nemo.

wbhart avatar Mar 11 '21 18:03 wbhart

We could change it so that one needs to write RealField(). We can't currently have it take a precision because we can't override the behaviour of Julia's arithmetic operations on its BigFloats.

The only way around this would be to have RealField actually encapsulate Julia's BigFloats. Then we could store a precision internally in the parent object and then use this in a 'do' block every time arithmetic is done so that the right precision is used.

If someone wants to work on this, go right ahead. I don't believe it will affect us, as we use the Nemo version exclusively.

wbhart avatar Apr 26 '21 09:04 wbhart

As this is something that might be better dealt with by the Julia community itself, I have created a new label for this purpose, so we can identify such tickets.

wbhart avatar Apr 26 '21 09:04 wbhart