![]() | 1 | initial version |
If you want to see what Sage does when you type in 12.34
into the command line, you can do
sage: preparse('12.34')
"RealNumber('12.34')"
You can see that it's just passing a string version of what you type in to the global function RealNumber
. Currently, that just returns a RealNumber object with 53 bits of precision. You can replace that with whatever you want. For example,
sage: R = RealField(100); R
Real Field with 100 bits of precision
sage: RealNumber = R
sage: 12.34
12.340000000000000000000000000
sage: (12.34).parent()
Real Field with 100 bits of precision