characteristic,
euler_constant,
factorial,
is_atomic_repr,
is_finite,
log2,
name,
pi,
rounding_mode,
scientific_notation
Further documentation:
) |
Returns 0, since the field of real numbers has characteristic 0.
sage: RealField(10).characteristic() 0
) |
Returns Euler's gamma constant to the precision of this field.
sage: RealField(100).euler_constant() 0.57721566490153286060651209008234
) |
Return the factorial of the integer n as a real number.
) |
Returns True, to signify that elements of this field print without sums, so parenthesis aren't required, e.g., in coefficients of polynomials.
sage: RealField(10).is_atomic_repr() True
) |
Returns False, since the field of real numbers is not finite.
sage: RealField(10).is_finite() False
) |
Returns log(2) to the precision of this field.
sage: R=RealField(100) sage: R.log2() 0.69314718055994530941723212145798 sage: R(2).log() 0.69314718055994530941723212145798
) |
Returns pi to the precision of this field.
sage: R = RealField(100) sage: R.pi() 3.1415926535897932384626433832793 sage: R.pi().sqrt()/2 0.88622692545275801364908374167063
) |
Set or return the scientific notation printing flag. If this flag is true then real numbers with this space as parent print using scientific notation.
INPUT: status -- optional flag
Instances of class RealField also have the following special methods:
__call__,
__cmp__,
__contains__,
__reduce__,
__repr__,
_coerce_
Further documentation:
) |
Needed for object persistence.