20211027 16:30:14 +0100  received badge  ● Famous Question (source) 
20200417 19:55:41 +0100  received badge  ● Notable Question (source) 
20190701 11:51:55 +0100  received badge  ● Popular Question (source) 
20161019 18:30:01 +0100  commented answer  Converting a symbolic expression to an element of a number field

20161019 06:10:39 +0100  received badge  ● Editor (source) 
20161019 05:35:58 +0100  asked a question  Converting a symbolic expression to an element of a number field 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 My question is: How can I convert a symbolic expression like Edit: I suppose since the map from the symbolic ring to the number field depends on an assumed embedding of the number field in the complex numbers, this might not be doable in any clean way. For now the following helper function works def SRtoQQI(v, imGen): # imGen = the immaginary unit in a ring QQ[I] rp = QQ(v.real_part()) # get real part of input ip = QQ(v.imag_part()) # get immaginary part of input return rp + ip*imGen # combine parts to get output I am still interested to know if there is a build in way, maybe making use of the embedding maps from 
20160905 16:27:31 +0100  received badge  ● Supporter (source) 
20160905 16:27:20 +0100  received badge  ● Scholar (source) 
20160402 20:33:27 +0100  received badge  ● Nice Question (source) 
20160402 00:51:42 +0100  received badge  ● Student (source) 
20160402 00:51:29 +0100  asked a question  Getting symbolic variable without resetting python variable. When calling the variable x gets set to the symbolic expression x just as if we had called In particular, any value stored in x is deleted. Is there a way to get a symbolic variable without setting the python variable to be that symbolic variable? I'm not super familiar with how sage handles symbolic variables so this might be unreasonable. 