At some point in a calculation in the symbolic ring I end up with some numbers which are complex rationals of the form (a/b + I*(c/d). At this point I would like to no longer treat them as symbolic expressions and rather work with them in a more well behaved field. Since all of the computation I will be doing will keep things as complex rationals it seems like the number field QQ[I]
is my best option.
My question is: How can I convert a symbolic expression like SR(2/3+4/5*I)
to an element of QQ[I]
. In general, there is no coercion from the symbolic ring to a number field, but in this special case there is a pretty clear map I would like to use.