2018-06-26 10:30:17 -0500 received badge ● Popular Question (source) 2017-10-09 07:07:10 -0500 received badge ● Notable Question (source) 2017-09-23 15:12:20 -0500 received badge ● Notable Question (source) 2017-07-07 15:16:16 -0500 received badge ● Notable Question (source) 2017-04-20 00:15:56 -0500 received badge ● Popular Question (source) 2017-01-03 16:32:50 -0500 commented question get short name for QQ, RDF, AA etc thanks for the explanation! 2017-01-03 14:15:23 -0500 asked a question get short name for QQ, RDF, AA etc I wonder whether there is a way to get back the short name of the function of the various rings and fields like QQ, RDF, AA, RLF, RR, etc. as a string. For example sage: a=QQ sage: str(a) 'Rational Field'  But I am looking for something like: sage: function_I_want(a) 'QQ'  I guess I could predefine a dictionary like this: shortnames={eval(name):name for name in ['QQ', 'RDF', 'AA', 'RLF', 'RR']}  and then have a function def function_I_want(a): return shortnames[a]  But this seems a bit clumsy. Is there a better way to do this; or is there somewhere in the sage code such a dictionary already defined? The reason I am thinking about this is the following tiny bug: https://trac.sagemath.org/ticket/22132 2016-12-09 06:28:53 -0500 received badge ● Nice Question (source) 2016-12-09 05:00:48 -0500 asked a question Issues with .99999999999... Here is a result that I found surprising and I don't understand completely what corercian is causing it. sage: int(.9999999999999999) 0 sage: int(.99999999999999999) 1 sage: int(0.99999999999999999) 0 sage: int(0.9999999999999999) 0 sage: int(0.999999999999999999999999999999999) 0  What is going on? More to play with: sage: a=.99999999999999999; b=0.999999999999999999999999999999999 sage: a