@@ -5710,66 +5710,6 @@ def create_RealNumber(s, int base=10, int pad=0, rnd="RNDN", int min_prec=53):
5710
5710
return RealLiteral(R, s, base)
5711
5711
5712
5712
5713
- # here because this imports the other real fields
5714
- def create_RealField (prec = 53 , type = " MPFR" , rnd = " RNDN" , sci_not = 0 ):
5715
- """
5716
- Create a real field with given precision, type, rounding mode and
5717
- scientific notation.
5718
-
5719
- Some options are ignored for certain types (RDF for example).
5720
-
5721
- INPUT:
5722
-
5723
- - ``prec`` -- a positive integer
5724
-
5725
- - ``type`` -- type of real field:
5726
-
5727
- - ``'RDF'`` -- the Sage real field corresponding to native doubles
5728
- - ``'Interval'`` -- real fields implementing interval arithmetic
5729
- - ``'RLF'`` -- the real lazy field
5730
- - ``'MPFR'`` -- floating point real numbers implemented using the MPFR
5731
- library
5732
-
5733
- - ``rnd`` -- rounding mode:
5734
-
5735
- - ``'RNDN'`` -- round to nearest
5736
- - ``'RNDZ'`` -- round toward zero
5737
- - ``'RNDD'`` -- round down
5738
- - ``'RNDU'`` -- round up
5739
-
5740
- - ``sci_not`` -- boolean, whether to use scientific notation for printing
5741
-
5742
- OUTPUT:
5743
-
5744
- the appropriate real field
5745
-
5746
- EXAMPLES::
5747
-
5748
- sage: from sage.rings.real_mpfr import create_RealField
5749
- sage: create_RealField(30)
5750
- Real Field with 30 bits of precision
5751
- sage: create_RealField(20, 'RDF') # ignores precision
5752
- Real Double Field
5753
- sage: create_RealField(60, 'Interval')
5754
- Real Interval Field with 60 bits of precision
5755
- sage: create_RealField(40, 'RLF') # ignores precision
5756
- Real Lazy Field
5757
- """
5758
- if type == " RDF" :
5759
- return RDF
5760
- elif type == " Interval" :
5761
- from .real_mpfi import RealIntervalField
5762
- return RealIntervalField(prec, sci_not)
5763
- elif type == " Ball" :
5764
- from .real_arb import RealBallField
5765
- return RealBallField(prec)
5766
- elif type == " RLF" :
5767
- from .real_lazy import RLF
5768
- return RLF
5769
- else :
5770
- return RealField(prec, sci_not, rnd)
5771
-
5772
-
5773
5713
def is_RealField (x ):
5774
5714
"""
5775
5715
Returns ``True`` if ``x`` is technically of a Python real field type.
@@ -5968,3 +5908,21 @@ cdef class int_toRR(Map):
5968
5908
raise TypeError (" argument cannot be converted to a Python int/long" )
5969
5909
5970
5910
return y
5911
+
5912
+
5913
+ def create_RealField (*args , **kwds ):
5914
+ r """
5915
+ Deprecated function moved to :mod:`sage. rings. real_field`.
5916
+
5917
+ TESTS::
5918
+
5919
+ sage: from sage. rings. real_mpfr import create_RealField
5920
+ sage: create_RealField( )
5921
+ doctest:... : DeprecationWarning: Please import create_RealField from sage. rings. real_field
5922
+ See http://trac. sagemath. org/24511 for details.
5923
+ Real Field with 53 bits of precision
5924
+ """
5925
+ from sage.misc.superseded import deprecation
5926
+ deprecation(24511 , " Please import create_RealField from sage.rings.real_field" )
5927
+ from sage.rings.real_field import create_RealField as cr
5928
+ return cr(* args, ** kwds)
0 commit comments