By that logic, rather than preparsing 1/2 we should force the user to
write ZZ(1) / ZZ(2). I find
sage: RealField(200)(1e-20)
9.9999999999999994515327145420957165172950370278739244710772e-21
surprising, as I explicitly asked for 200 digits of precision, this is
a natural way to write a "literal" of high precision. I'll admit
sage: Reals(200)(RealField(53)(1e-20))
1.0000000000000000000000000000000000000000000000000000000000e-20
is probably wrong. BTW, it was intended not just for real fields but
exact ones as well (thought that seems to have changed, as now
sage: QQ(1e-20)
1/99999999999999990439
sage: ZZ(1e30)
1000000000000000019884624838656
though this should be an easy fix. (Yes, I see why that's true, but
for someone who's not a numerical analyst it's quite unfortunate.)
(FWIW, the problem with putting literals in another field, like
RealLazyField, is what to do when doing arithmetic like 1.2 + 1.7 one
wants arithmetic with reals of unspecified parent to be "fast." The
literalness of floating point literals is supposed to just affect
constructors. It almost makes one want to encode the desired precision
in the literal itself....)
- Robert