Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac 24523: py3 format style + "Real Field" -> "Real Floating-Point F…
Browse files Browse the repository at this point in the history
…ield"
  • Loading branch information
mjungmath committed Jan 9, 2021
2 parents 9d686f2 + ca51262 commit 1fa235c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/sage/rings/real_interval_absolute.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ cdef class RealIntervalAbsoluteField_class(Field):
sage: R._repr_()
'Real Interval Field with absolute precision 2^-100'
"""
return "Real Interval Field with absolute precision 2^-%s" % self._absprec
s = "Real Interval Field with absolute precision 2^-{}".format(self._absprec)
return s

def absprec(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/real_mpfi.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ cdef class RealIntervalField_class(Field):
sage: RealIntervalField(200) # indirect doctest
Real Interval Field with 200 bits of precision
"""
s = "Real Interval Field with %s bits of precision"%self.__prec
s = "Real Interval Field with {} bits of precision".format(self.__prec)
return s

def _latex_(self):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/real_mpfr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,9 @@ cdef class RealField_class(sage.rings.ring.Field):
sage: RealField(17,rnd='RNDD') # indirect doctest
Real Field with 17 bits of precision and rounding RNDD
"""
s = "Real Field with %s bits of precision"%self.__prec
s = "Real Floating-Point Field with {} bits of precision".format(self.__prec)
if self.rnd != MPFR_RNDN:
s = s + " and rounding %s"%(self.rnd_str)
s = s + " and rounding {}".format(self.rnd_str)
return s

def _latex_(self):
Expand Down

0 comments on commit 1fa235c

Please sign in to comment.