11.07.2015 Views

Fixed and Arbitrary Precision Numerical Fields - Sage

Fixed and Arbitrary Precision Numerical Fields - Sage

Fixed and Arbitrary Precision Numerical Fields - Sage

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Sage</strong> Reference Manual: <strong>Fixed</strong> <strong>and</strong> <strong>Arbitrary</strong> <strong>Precision</strong> <strong>Numerical</strong> <strong>Fields</strong>, Release 6.2sage: RR.gens()[1.00000000000000]is_exact()Return False, since a real field (represented using finite precision) is not exact.EXAMPLE:sage: RR.is_exact()Falsesage: RealField(100).is_exact()Falseis_finite()Return False, since the field of real numbers is not finite.EXAMPLES:sage: RealField(10).is_finite()Falselog2()Return log(2) (i.e., the natural log of 2) to the precision of this field.EXAMPLES:sage: R=RealField(100)sage: R.log2()0.69314718055994530941723212146sage: R(2).log()0.69314718055994530941723212146name()Return the name of self, which encodes the precision <strong>and</strong> rounding convention.EXAMPLES:sage: RR.name()’RealField53_0’sage: RealField(100,rnd=’RNDU’).name()’RealField100_2’ngens()Return the number of generators.EXAMPLES:sage: RR.ngens()1pi()Return π to the precision of this field.EXAMPLES:sage: R = RealField(100)sage: R.pi()3.1415926535897932384626433833sage: R.pi().sqrt()/20.88622692545275801364908374167sage: R = RealField(150)30 Chapter 2. <strong>Arbitrary</strong> <strong>Precision</strong> Real Numbers

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!