-
Notifications
You must be signed in to change notification settings - Fork 59
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
Can we make ComplexField(QQ) ? #1110
Comments
It is already there, but maybe not under the name that you would have in mind. julia> Qx, x = QQ["x"]
(Univariate Polynomial Ring in x over Rational Field, x)
julia> CC, i = NumberField(x^2 + 1, "i")
(Number field over Rational Field with defining polynomial x^2 + 1, i)
julia> i^2
-1 (https://en.wikipedia.org/wiki/Gaussian_rational) Do you have a suggestion for an alias? Would you suggest |
So great! Thank you. |
I don't have any objections. It would be nice if it also worked for Nemo. |
This is a about Nemo. |
I have a reservation about ComplexField(QQ): it suggests that we can do ComplexField(F) for a multitude of fields F, ie extent F by a nonreal something. What is ComplexField(GF(5)) or ComplexField(GF(7))? On a related note, Complex{fmpq} doesn't work :( |
After sleeping one night over this, I also don't like it too much anymore. It does not really play nice with |
So, I have come across the need for exactly this kind of thing. There are parents julia> i = ZZi(im)
im
julia> typeof(ans)
fmpzi
julia> x = (3+4i)//(5+10i)
(11 - 2*im)/25
julia> typeof(ans)
fmpqi
julia> (numerator(x), denominator(x))
(2 + im, 4 + 3*im)
julia> map(factor, ans)
(1 * (2 + im), im * (2 - im)^2) It is supposed to play nice with the other complex types: julia> CC = AcbField(50); gamma(CC(1/2,1/3))
[1.1789716859081 +/- 3.88e-14] + [-0.7570793934981 +/- 4.63e-14]*im
julia> simplest_rational_inside(ans)
(38171685330064 - 24512035975001*im)/32377100982424 (This may or may not be the simplest rational inside, it is just for demo purposes) |
We won't add |
Is it possible to have the rational complex field instead of the float number complex field?
Meanwhile maybe fit into LaurentSeriesField(ComplexField(QQ), 5, "ep")?
The text was updated successfully, but these errors were encountered: